diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-09 17:08:20 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-09 17:08:20 +0000 |
commit | 66d3700346154acfc4d080bd86fc40c1945096ef (patch) | |
tree | e2eaabb9805fb576ca4c7132dc4c782a0c147d3e /src/inspircd.cpp | |
parent | 3d5f1644b351ecd52a6a50d2ad57dcfc4c9ac69b (diff) |
Fixes to 'N' packets
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@474 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index ce57008bc..d39f5e90d 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -5152,6 +5152,7 @@ void process_restricted_commands(char token,char* params,serverrec* source,serve // introduce remote client case 'N': handle_N(token,params,source,reply,udp_host,udp_port); + log(DEBUG,"Sync: exit 1"); break; // J <NICK> :<CHANLIST> // Join user to channel list, merge channel permissions @@ -5367,6 +5368,7 @@ void handle_link_packet(long theirkey, char* udp_msg, char* udp_host, int udp_po if (servers[j]->key == theirkey) { // found a valid key for this server, can process restricted stuff here process_restricted_commands(token,params,servers[j],serv,udp_host,udp_port); + log(DEBUG,"Sync: exit 2"); return; } } @@ -5591,6 +5593,7 @@ int InspIRCd(void) handle_link_packet(theirkey, udp_msg, udp_host, udp_port, me[x]); // link packets can manipulate the usertable so beware of // any loops here watching the user or channels hash + log(DEBUG,"Sync: exit 3"); } } } @@ -5614,7 +5617,7 @@ int InspIRCd(void) if (!count2->second) break; if (count2->second) - if (count2->second->fd) + if (count2->second->fd != 0) { // assemble up to 64 sockets into an fd_set // to implement a pooling mechanism. @@ -5654,6 +5657,10 @@ int InspIRCd(void) count2++; total_in_this_set++; } + else + { + log(DEBUG,"Not adding %s as they are remote",count2->second->nick); + } } else break; } @@ -5672,7 +5679,7 @@ int InspIRCd(void) for (user_hash::iterator count2a = xcount; count2a != endingiter; count2a++) { result = EAGAIN; - if (FD_ISSET (count2a->second->fd, &sfd)) + if ((count2a->second->fd != -1) && (FD_ISSET (count2a->second->fd, &sfd))) { memset(data, 0, 10240); result = read(count2a->second->fd, data, 10240); |