X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccore%2Fsilcpacket.c;h=39ca67c4148f356a7a0e53e03cdaf2ad91030dc1;hb=7ada165ecc5e25429cd4fc9511f31794cd86d540;hp=2a2b9af18345a2079f7403b83c25dc48cd5c1b05;hpb=e0bbbcc41edc732a66c55d26a56002f907fdaaf4;p=silc.git diff --git a/lib/silccore/silcpacket.c b/lib/silccore/silcpacket.c index 2a2b9af1..39ca67c4 100644 --- a/lib/silccore/silcpacket.c +++ b/lib/silccore/silcpacket.c @@ -1434,7 +1434,7 @@ static void silc_packet_read_process(SilcPacketStream stream) SilcUInt32 paddedlen, mac_len, block_len, ivlen, psnlen; unsigned char tmp[SILC_PACKET_MIN_HEADER_LEN], *header; unsigned char iv[SILC_CIPHER_MAX_IV_SIZE], *packet_seq = NULL; - SilcBool normal = TRUE; + SilcBool normal; int ret; /* Parse the packets from the data */ @@ -1442,6 +1442,7 @@ static void silc_packet_read_process(SilcPacketStream stream) ivlen = psnlen = 0; cipher = stream->receive_key[0]; hmac = stream->receive_hmac[0]; + normal = FALSE; if (silc_buffer_len(&stream->inbuf) < (stream->iv_included ? SILC_PACKET_MIN_HEADER_LEN_IV : @@ -1547,6 +1548,7 @@ static void silc_packet_read_process(SilcPacketStream stream) silc_buffer_reset(&stream->inbuf); return; } + packet->stream = stream; /* Allocate more space to packet buffer, if needed */ if (silc_buffer_truelen(&packet->buffer) < paddedlen) { @@ -1616,7 +1618,6 @@ static void silc_packet_read_process(SilcPacketStream stream) silc_buffer_pull(&stream->inbuf, paddedlen + mac_len); /* Dispatch the packet to application */ - packet->stream = stream; silc_packet_dispatch(packet); }