summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-08-12 08:39:15 +0200
committerStefan Metzmacher <metze@samba.org>2011-08-12 12:36:03 +0200
commit0d1a7fda1ef5e1358228ab2b5e74b18a877e0732 (patch)
treea05fab70e8d84e431cd01c186db08fea3180a470 /source3/libsmb
parentedeb41aa204ca9814602bee1c7d9be32e5f737b5 (diff)
downloadsamba-0d1a7fda1ef5e1358228ab2b5e74b18a877e0732.tar.gz
samba-0d1a7fda1ef5e1358228ab2b5e74b18a877e0732.tar.bz2
samba-0d1a7fda1ef5e1358228ab2b5e74b18a877e0732.zip
s3:libsmb: keep the request order in cli_smb_req_unset_pending()
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Aug 12 12:36:03 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/async_smb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 5396d22881..488e953436 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -162,7 +162,9 @@ void cli_smb_req_unset_pending(struct tevent_req *req)
/*
* Remove ourselves from the cli->conn.pending array
*/
- cli->conn.pending[i] = cli->conn.pending[num_pending-1];
+ for (; i < (num_pending - 1); i++) {
+ cli->conn.pending[i] = cli->conn.pending[i+1];
+ }
/*
* No NULL check here, we're shrinking by sizeof(void *), and