s3:libsmb/async_smb: let cli_smb_recv() initialize output values for one way requests
authorStefan Metzmacher <metze@samba.org>
Tue, 7 Jun 2011 22:40:54 +0000 (00:40 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 17 Jun 2011 18:57:47 +0000 (20:57 +0200)
metze
(cherry picked from commit 49cdf171a5198495aead9ace43963e805331e20b)

source3/libsmb/async_smb.c

index 8c5627d04cd3c887c4593c772383dcf074adda73..1f72f1ad5a6b0a09d538691b7a000255c2248f9d 100644 (file)
@@ -783,6 +783,24 @@ NTSTATUS cli_smb_recv(struct tevent_req *req,
        }
 
        if (state->inbuf == NULL) {
+               if (min_wct != 0) {
+                       return NT_STATUS_INVALID_NETWORK_RESPONSE;
+               }
+               if (pinbuf) {
+                       *pinbuf = NULL;
+               }
+               if (pwct) {
+                       *pwct = 0;
+               }
+               if (pvwv) {
+                       *pvwv = NULL;
+               }
+               if (pnum_bytes) {
+                       *pnum_bytes = 0;
+               }
+               if (pbytes) {
+                       *pbytes = NULL;
+               }
                /* This was a request without a reply */
                return NT_STATUS_OK;
        }