From 97e8c5bcecb1fe4ef551906540b3d299f7c9c682 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 6 Oct 2005 05:25:35 +0000 Subject: r10754: fixed a valgrind error for unmatched SMB replies (This used to be commit b714ab64fd79d5cabc39779774fae7c3861a84da) --- source4/libcli/raw/clitransport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 7d4891da00..b07bd630e9 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -385,7 +385,7 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport) { uint8_t *buffer, *hdr, *vwv; int len; - uint16_t wct=0, mid = 0; + uint16_t wct=0, mid = 0, op = 0; struct smbcli_request *req; buffer = transport->recv_buffer.buffer; @@ -424,6 +424,7 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport) /* extract the mid for matching to pending requests */ mid = SVAL(hdr, HDR_MID); wct = CVAL(hdr, HDR_WCT); + op = CVAL(hdr, HDR_COM); } /* match the incoming request against the list of pending requests */ @@ -432,8 +433,7 @@ static void smbcli_transport_finish_recv(struct smbcli_transport *transport) } if (!req) { - DEBUG(1,("Discarding unmatched reply with mid %d op %d\n", - mid, CVAL(hdr, HDR_COM))); + DEBUG(1,("Discarding unmatched reply with mid %d op %d\n", mid, op)); goto error; } -- cgit