mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Fixes for nonblocking socket issues
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@593 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
a62c272ea2
commit
bed0c38419
@ -119,7 +119,7 @@ void ChangeDisplayedHost(userrec* user, const char* host);
|
||||
|
||||
// mesh network functions
|
||||
|
||||
void NetSendToCommon(userrec* u, chanrec* c, char* s);
|
||||
void NetSendToCommon(userrec* u, char* s);
|
||||
void NetSendToAll(char* s);
|
||||
void NetSendToOne(char* target,char* s);
|
||||
void NetSendToAllExcept(char* target,char* s);
|
||||
|
@ -13,9 +13,9 @@ LeftChar=1
|
||||
[Editor_1]
|
||||
Open=1
|
||||
Top=1
|
||||
CursorCol=30
|
||||
CursorRow=899
|
||||
TopLine=863
|
||||
CursorCol=25
|
||||
CursorRow=4522
|
||||
TopLine=4491
|
||||
LeftChar=1
|
||||
|
||||
[Editor_2]
|
||||
@ -107,11 +107,11 @@ TopLine=1
|
||||
LeftChar=1
|
||||
|
||||
[Editor_13]
|
||||
Open=0
|
||||
Open=1
|
||||
Top=0
|
||||
CursorCol=17
|
||||
CursorRow=17
|
||||
TopLine=1
|
||||
CursorCol=5
|
||||
CursorRow=48
|
||||
TopLine=16
|
||||
LeftChar=1
|
||||
|
||||
[Editor_14]
|
||||
@ -141,8 +141,8 @@ LeftChar=1
|
||||
[Editor_17]
|
||||
Open=1
|
||||
Top=0
|
||||
CursorCol=19
|
||||
CursorRow=123
|
||||
CursorCol=34
|
||||
CursorRow=122
|
||||
TopLine=63
|
||||
LeftChar=1
|
||||
|
||||
@ -197,9 +197,9 @@ LeftChar=1
|
||||
[Editor_24]
|
||||
Open=1
|
||||
Top=0
|
||||
CursorCol=4
|
||||
CursorRow=272
|
||||
TopLine=246
|
||||
CursorCol=50
|
||||
CursorRow=238
|
||||
TopLine=207
|
||||
LeftChar=1
|
||||
[Editor_25]
|
||||
Open=1
|
||||
|
@ -178,6 +178,12 @@ bool connection::AddIncoming(int fd,char* targethost)
|
||||
connector.SetServerName(targethost);
|
||||
connector.SetDescriptor(fd);
|
||||
connector.SetState(STATE_NOAUTH_INBOUND);
|
||||
int flags = fcntl(fd, F_GETFL, 0);
|
||||
fcntl(fd, F_SETFL, flags | O_NONBLOCK);
|
||||
int sendbuf = 32768;
|
||||
int recvbuf = 32768;
|
||||
setsockopt(fd,SOL_SOCKET,SO_SNDBUF,(const void *)&sendbuf,sizeof(sendbuf));
|
||||
setsockopt(fd,SOL_SOCKET,SO_RCVBUF,(const void *)&recvbuf,sizeof(sendbuf));
|
||||
this->connectors.push_back(connector);
|
||||
return true;
|
||||
}
|
||||
|
@ -877,6 +877,7 @@ bool CommonOnThisServer(userrec* u,const char* servername)
|
||||
{
|
||||
if (!strcasecmp(i->second->server,servername))
|
||||
{
|
||||
log(DEBUG,"%s is common to %s sharing with %s",i->second->nick,servername,u->nick);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -885,7 +886,7 @@ bool CommonOnThisServer(userrec* u,const char* servername)
|
||||
}
|
||||
|
||||
|
||||
void NetSendToCommon(userrec* u, chanrec* c, char* s)
|
||||
void NetSendToCommon(userrec* u, char* s)
|
||||
{
|
||||
char buffer[MAXBUF];
|
||||
snprintf(buffer,MAXBUF,"%s",s);
|
||||
@ -4434,7 +4435,7 @@ void handle_privmsg(char **parameters, int pcnt, userrec *user)
|
||||
// if any users of this channel are on remote servers, broadcast the packet
|
||||
char buffer[MAXBUF];
|
||||
snprintf(buffer,MAXBUF,"P %s %s :%s",user->nick,chan->name,parameters[1]);
|
||||
NetSendToCommon(user,chan,buffer);
|
||||
NetSendToCommon(user,buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4518,7 +4519,7 @@ void handle_notice(char **parameters, int pcnt, userrec *user)
|
||||
// if any users of this channel are on remote servers, broadcast the packet
|
||||
char buffer[MAXBUF];
|
||||
snprintf(buffer,MAXBUF,"V %s %s :%s",user->nick,chan->name,parameters[1]);
|
||||
NetSendToCommon(user,chan,buffer);
|
||||
NetSendToCommon(user,buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -6943,7 +6944,7 @@ int InspIRCd(void)
|
||||
}
|
||||
}
|
||||
|
||||
for (int x = 0; x != UDPportCount; x++)
|
||||
for (int x = 0; x < UDPportCount; x++)
|
||||
{
|
||||
std::deque<std::string> msgs;
|
||||
msgs.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user