s4:librpc/dcerpc_smb: fix smb_write_callback()
authorStefan Metzmacher <metze@samba.org>
Thu, 27 Oct 2011 20:55:17 +0000 (22:55 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 28 Oct 2011 06:11:00 +0000 (08:11 +0200)
The should use smb_raw_write_recv() to get the result.

metze

source4/librpc/rpc/dcerpc_smb.c

index c2312953f849a864c8958f8ca49dd32d144f2a48..bdba21734c8450f07ba071f1e0fbe6b7c0e63714 100644 (file)
@@ -308,13 +308,18 @@ static NTSTATUS smb_send_trans_request(struct dcecli_connection *c, DATA_BLOB *b
 static void smb_write_callback(struct smbcli_request *req)
 {
        struct dcecli_connection *c = (struct dcecli_connection *)req->async.private_data;
+       union smb_write io;
+       NTSTATUS status;
 
-       if (!NT_STATUS_IS_OK(req->status)) {
-               DEBUG(0,("dcerpc_smb: write callback error\n"));
-               pipe_dead(c, req->status);
-       }
+       ZERO_STRUCT(io);
+       io.generic.level = RAW_WRITE_WRITEX;
 
-       smbcli_request_destroy(req);
+       status = smb_raw_write_recv(req, &io);
+       if (!NT_STATUS_IS_OK(status)) {
+               DEBUG(0,("dcerpc_smb: write callback error: %s\n",
+                       nt_errstr(status)));
+               pipe_dead(c, status);
+       }
 }
 
 /*