X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Ffnet-dc.c;h=a99b6804d7833c0ecf1cb4c366c0b30c377cbd92;hb=e374cdc38e25170addc8119d93ae4fa679e44693;hp=811b5e0480822a9b2a324de28db29245c9d5c152;hpb=0d8c93cb58054c3998b023e9e5ab53f15f9cb2fc;p=doldaconnect.git diff --git a/daemon/fnet-dc.c b/daemon/fnet-dc.c index 811b5e0..a99b680 100644 --- a/daemon/fnet-dc.c +++ b/daemon/fnet-dc.c @@ -2982,15 +2982,15 @@ static void peerread(struct socket *sk, struct dcpeer *peer) newqcmd(&peer->queue, peer->inbuf); for(cmd = peercmds; cmd->handler != NULL; cmd++) { - if(!memcmp(peer->inbuf, cmd->name, strlen(cmd->name)) && (peer->inbuf[strlen(cmd->name)] == 0)) + if(!memcmp(peer->inbuf, cmd->name, strlen(cmd->name)) && ((peer->inbuf[strlen(cmd->name)] == ' ') || (peer->inbuf[strlen(cmd->name)] == '|'))) break; } + memmove(peer->inbuf, p, peer->inbufdata -= p - peer->inbuf); if(cmd->stop) { peer->state = PEER_STOP; break; } - memmove(peer->inbuf, p, peer->inbufdata -= p - peer->inbuf); } } else if(peer->state == PEER_TTHL) { handletthl(peer);