Revert "smbd: explain that/why we use the raw tevent_context for lease_timeout_handler()"
[garming/samba-autobuild/.git] / source3 / smbd / pipes.c
index 110951ca67cb4186d28c596033a00f5e690986be..4be57bc2a5f0dea80515419bdaa2d8763be60958 100644 (file)
@@ -51,7 +51,7 @@ NTSTATUS open_np_file(struct smb_request *smb_req, const char *name,
        fsp->can_lock = false;
        fsp->access_mask = FILE_READ_DATA | FILE_WRITE_DATA;
 
-       smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, NULL);
+       smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, NULL, 0);
        if (smb_fname == NULL) {
                file_free(smb_req, fsp);
                return NT_STATUS_NO_MEMORY;
@@ -64,8 +64,8 @@ NTSTATUS open_np_file(struct smb_request *smb_req, const char *name,
        }
 
        status = np_open(fsp, name,
-                        conn->sconn->local_address,
                         conn->sconn->remote_address,
+                        conn->sconn->local_address,
                         conn->session_info,
                         conn->sconn->ev_ctx,
                         conn->sconn->msg_ctx,
@@ -246,7 +246,7 @@ static void pipe_write_done(struct tevent_req *subreq)
        DEBUG(3,("write-IPC nwritten=%d\n", (int)nwritten));
 
  send:
-       if (!srv_send_smb(req->sconn, (char *)req->outbuf,
+       if (!srv_send_smb(req->xconn, (char *)req->outbuf,
                          true, req->seqnum+1,
                          IS_CONN_ENCRYPTED(req->conn)||req->encrypted,
                          &req->pcd)) {
@@ -399,7 +399,7 @@ void reply_pipe_read_and_X(struct smb_request *req)
            is deliberate, instead we always return the next lump of
            data on the pipe */
 #if 0
-       uint32 smb_offs = IVAL(req->vwv+3, 0);
+       uint32_t smb_offs = IVAL(req->vwv+3, 0);
 #endif
 
        if (!fsp_is_np(fsp)) {
@@ -492,7 +492,6 @@ static void pipe_read_andx_done(struct tevent_req *subreq)
              + 12 * sizeof(uint16_t) /* vwv */
              + 2               /* the buflen field */
              + 1);             /* padding byte */
-       SSVAL(req->outbuf,smb_vwv11,state->smb_maxcnt);
 
        DEBUG(3,("readX-IPC min=%d max=%d nread=%d\n",
                 state->smb_mincnt, state->smb_maxcnt, (int)nread));