diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-14 18:58:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-14 18:58:25 +0000 |
commit | 8be0c0008766de9003c7e8dd2ae74bf7c9dcd525 (patch) | |
tree | 25034a9d41c26eba067bacd9a72fd47c17914e7a /src/inspircd.cpp | |
parent | 84d9f0dc9aa9eff59ec606882821e82bf9194752 (diff) |
More fixes to connection buffer handling
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@579 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 5b85093c1..b43734073 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -7082,16 +7082,22 @@ int InspIRCd(void) for (int x = 0; x != UDPportCount; x++) { - long theirkey = 0; - if (me[x]->RecvPacket(udp_msg, udp_host)) + string_list msgs; + msgs.clear(); + if (me[x]->RecvPacket(msgs, udp_host)) { - if (strlen(udp_msg)<1) { - log(DEBUG,"Invalid string from %s [route%d]",udp_host,x); - } - else - { - FOREACH_MOD OnPacketReceive(udp_msg); - handle_link_packet(udp_msg, udp_host, me[x]); + for (int ctr = 0; ctr < msgs.size(); ctr++) + { + char udp_msg[MAXBUF]; + strncpy(udp_msg,MAXBUF,msgs[ctr].c_str()); + if (strlen(udp_msg)<1) + { + log(DEBUG,"Invalid string from %s [route%d]",udp_host,x); + break; + } + FOREACH_MOD OnPacketReceive(udp_msg); + handle_link_packet(udp_msg, udp_host, me[x]); + } goto label; } } |