mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Merge pull request #301 from Adam-/insp20+bindrehash
Fix bug #291 - fix rehashing bind tags not changing them between servers/clients and ssl/nonssl
This commit is contained in:
commit
35ce47718b
@ -142,6 +142,21 @@ class CoreExport reference
|
||||
if (value && value->refcount_dec())
|
||||
delete value;
|
||||
}
|
||||
|
||||
inline reference<T>& operator=(T* other)
|
||||
{
|
||||
if (value != other)
|
||||
{
|
||||
if (value && value->refcount_dec())
|
||||
delete value;
|
||||
value = other;
|
||||
if (value)
|
||||
value->refcount_inc();
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline operator bool() const { return value; }
|
||||
inline operator T*() const { return value; }
|
||||
inline T* operator->() const { return value; }
|
||||
|
@ -146,7 +146,7 @@ namespace irc
|
||||
class CoreExport ListenSocket : public EventHandler
|
||||
{
|
||||
public:
|
||||
const reference<ConfigTag> bind_tag;
|
||||
reference<ConfigTag> bind_tag;
|
||||
std::string bind_addr;
|
||||
int bind_port;
|
||||
/** Human-readable bind description */
|
||||
|
@ -105,6 +105,7 @@ int InspIRCd::BindPorts(FailedPortList &failed_ports)
|
||||
{
|
||||
if ((**n).bind_desc == bind_readable)
|
||||
{
|
||||
(*n)->bind_tag = tag; // Replace tag, we know addr and port match, but other info (type, ssl) may not
|
||||
skip = true;
|
||||
old_ports.erase(n);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user