Author: vlendec
Date: 2007-07-30 19:53:57 +0000 (Mon, 30 Jul 2007)
New Revision: 24086

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24086

Log:
Convert reply_ulogoffX to the new API
Modified:
   branches/SAMBA_3_2/source/smbd/process.c
   branches/SAMBA_3_2/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/process.c    2007-07-30 14:07:29 UTC (rev 
24085)
+++ branches/SAMBA_3_2/source/smbd/process.c    2007-07-30 19:53:57 UTC (rev 
24086)
@@ -750,7 +750,7 @@
 /* 0x71 */ { "SMBtdis",NULL,reply_tdis,DO_CHDIR},
 /* 0x72 */ { "SMBnegprot",NULL,reply_negprot,0},
 /* 0x73 */ { "SMBsesssetupX",NULL,reply_sesssetup_and_X,0},
-/* 0x74 */ { "SMBulogoffX", reply_ulogoffX,NULL, 0}, /* ulogoff doesn't give a 
valid TID */
+/* 0x74 */ { "SMBulogoffX", NULL,reply_ulogoffX, 0}, /* ulogoff doesn't give a 
valid TID */
 /* 0x75 */ { "SMBtconX",NULL,reply_tcon_and_X,0},
 /* 0x76 */ { NULL, NULL, NULL, 0 },
 /* 0x77 */ { NULL, NULL, NULL, 0 },

Modified: branches/SAMBA_3_2/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/reply.c      2007-07-30 14:07:29 UTC (rev 
24085)
+++ branches/SAMBA_3_2/source/smbd/reply.c      2007-07-30 19:53:57 UTC (rev 
24086)
@@ -1669,28 +1669,33 @@
  conn POINTER CAN BE NULL HERE !
 ****************************************************************************/
 
-int reply_ulogoffX(connection_struct *conn, char *inbuf,char *outbuf,int 
length,int bufsize)
+void reply_ulogoffX(connection_struct *conn, struct smb_request *req)
 {
-       uint16 vuid = SVAL(inbuf,smb_uid);
-       user_struct *vuser = get_valid_user_struct(vuid);
+       user_struct *vuser;
+
        START_PROFILE(SMBulogoffX);
 
-       if(vuser == 0)
-               DEBUG(3,("ulogoff, vuser id %d does not map to user.\n", vuid));
+       vuser = get_valid_user_struct(req->vuid);
 
+       if(vuser == NULL) {
+               DEBUG(3,("ulogoff, vuser id %d does not map to user.\n",
+                        req->vuid));
+       }
+
        /* in user level security we are supposed to close any files
                open by this user */
-       if ((vuser != 0) && (lp_security() != SEC_SHARE))
-               file_close_user(vuid);
+       if ((vuser != NULL) && (lp_security() != SEC_SHARE)) {
+               file_close_user(req->vuid);
+       }
 
-       invalidate_vuid(vuid);
+       invalidate_vuid(req->vuid);
 
-       set_message(inbuf,outbuf,2,0,True);
+       reply_outbuf(req, 2, 0);
 
-       DEBUG( 3, ( "ulogoffX vuid=%d\n", vuid ) );
+       DEBUG( 3, ( "ulogoffX vuid=%d\n", req->vuid ) );
 
        END_PROFILE(SMBulogoffX);
-       return chain_reply(inbuf,&outbuf,length,bufsize);
+       chain_reply_new(req);
 }
 
 /****************************************************************************

Reply via email to