From: Pekka Riikonen Date: Tue, 19 Mar 2002 15:19:59 +0000 (+0000) Subject: Fixed packet queue purging. X-Git-Tag: silc.toolkit.0.8.1~6 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=a9220265d27dac55add524ebb96f3ea6b71b1eca Fixed packet queue purging. --- diff --git a/apps/silcd/packet_send.c b/apps/silcd/packet_send.c index 3cda68b0..a6191b79 100644 --- a/apps/silcd/packet_send.c +++ b/apps/silcd/packet_send.c @@ -1870,12 +1870,7 @@ void silc_server_packet_queue_purge(SilcServer server, if (sock && SILC_IS_OUTBUF_PENDING(sock) && (SILC_IS_DISCONNECTED(sock) == FALSE)) { server->stat.packets_sent++; - - if (sock->outbuf->data - sock->outbuf->head) - silc_buffer_push(sock->outbuf, sock->outbuf->data - sock->outbuf->head); - silc_packet_send(sock, TRUE); - SILC_SET_CONNECTION_FOR_INPUT(server->schedule, sock->sock); SILC_UNSET_OUTBUF_PENDING(sock); silc_buffer_clear(sock->outbuf); diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index 7fc3b8d4..64ecee88 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -1263,11 +1263,7 @@ void silc_client_packet_queue_purge(SilcClient client, { if (sock && SILC_IS_OUTBUF_PENDING(sock) && (SILC_IS_DISCONNECTED(sock) == FALSE)) { - if (sock->outbuf->data - sock->outbuf->head) - silc_buffer_push(sock->outbuf, sock->outbuf->data - sock->outbuf->head); - silc_packet_send(sock, TRUE); - SILC_CLIENT_SET_CONNECTION_FOR_INPUT(client->schedule, sock->sock); SILC_UNSET_OUTBUF_PENDING(sock); silc_buffer_clear(sock->outbuf);