summaryrefslogtreecommitdiff
path: root/source4/libcli/raw/clitransport.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-10-06 05:25:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:26 -0500
commit97e8c5bcecb1fe4ef551906540b3d299f7c9c682 (patch)
tree6b6566254b7c5ef24dbee59ccd7cdcadc989488e /source4/libcli/raw/clitransport.c
parent5fd031c97daaa1bf09a7ad80550753acd434075f (diff)
downloadsamba-97e8c5bcecb1fe4ef551906540b3d299f7c9c682.tar.gz
samba-97e8c5bcecb1fe4ef551906540b3d299f7c9c682.tar.bz2
samba-97e8c5bcecb1fe4ef551906540b3d299f7c9c682.zip
r10754: fixed a valgrind error for unmatched SMB replies
(This used to be commit b714ab64fd79d5cabc39779774fae7c3861a84da)
Diffstat (limited to 'source4/libcli/raw/clitransport.c')
-rw-r--r--source4/libcli/raw/clitransport.c6
1 files 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;
}