g_Bouncer->GetAdminUsers()->Insert(this);
}
- m_NetworkUnreachable = false;
+ m_NextProtocolFamily = AF_INET6;
}
/**
g_Bouncer->SetIdent(m_Name);
}
- CIRCConnection *Connection = new CIRCConnection(Server, Port, this, BindIp, GetSSL(), m_NetworkUnreachable ? AF_INET : AF_UNSPEC);
-
- m_NetworkUnreachable = false;
+ CIRCConnection *Connection = new CIRCConnection(Server, Port, this, BindIp, GetSSL(), m_NextProtocolFamily);
if (AllocFailed(Connection)) {
return;
WasNull = false;
if (m_IRC->GetState() == State_Connecting) {
- SetNetworkUnreachable(true);
+ if (m_NextProtocolFamily == AF_INET) {
+ m_NextProtocolFamily = AF_INET6;
+ } else {
+ m_NextProtocolFamily = AF_INET;
+ }
}
m_IRC->SetOwner(NULL);
return CacheGetString(m_ConfigCache, channelsort);
}
-void CUser::SetNetworkUnreachable(bool Value) {
- m_NetworkUnreachable = Value;
-}
-
-bool CUser::GetNetworkUnreachable(void) const {
- return m_NetworkUnreachable;
-}
-
void CUser::SetAutoBacklog(const char *Value) {
CacheSetString(m_ConfigCache, autobacklog, Value);
}
CVector<X509 *> m_ClientCertificates; /**< the client certificates for the user */
- bool m_NetworkUnreachable; /**< whether the last connection error was 'network unreachable' */
+ bool m_NextProtocolFamily; /**< which protocol family to try next */
bool PersistCertificates(void);
void SetChannelSortMode(const char *Mode);
const char *GetChannelSortMode(void) const;
- void SetNetworkUnreachable(bool Value);
- bool GetNetworkUnreachable(void) const;
+ void SwitchProtocolFamily(void);
void SetAutoBacklog(const char *Value);
const char *GetAutoBacklog(void);