r24079: Convert reply_dskattr to the new API
authorVolker Lendecke <vlendec@samba.org>
Mon, 30 Jul 2007 10:30:19 +0000 (10:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:29:03 +0000 (12:29 -0500)
(This used to be commit c8e0aa5752fde34f7271a4fad758dfae0991722d)

source3/smbd/process.c
source3/smbd/reply.c

index fdec2d106d52495400e25b7bb94a012ab1310425..971a9d299bb9df2069e2b2ddb5b97fe09e629dfb 100644 (file)
@@ -762,7 +762,7 @@ static const struct smb_message_struct {
 /* 0x7d */ { NULL, NULL, NULL, 0 },
 /* 0x7e */ { NULL, NULL, NULL, 0 },
 /* 0x7f */ { NULL, NULL, NULL, 0 },
-/* 0x80 */ { "SMBdskattr",reply_dskattr,NULL,AS_USER},
+/* 0x80 */ { "SMBdskattr",NULL,reply_dskattr,AS_USER},
 /* 0x81 */ { "SMBsearch",reply_search,NULL,AS_USER},
 /* 0x82 */ { "SMBffirst",reply_search,NULL,AS_USER},
 /* 0x83 */ { "SMBfunique",reply_search,NULL,AS_USER},
index 7af0807c0a0df5df55e83272133086827f8b4525..13f1c1ce58c0eb45a8dd0d35ae370b6b028175b4 100644 (file)
@@ -1007,18 +1007,18 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
  Reply to a dskattr.
 ****************************************************************************/
 
-int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
+void reply_dskattr(connection_struct *conn, struct smb_request *req)
 {
-       int outsize = 0;
        SMB_BIG_UINT dfree,dsize,bsize;
        START_PROFILE(SMBdskattr);
 
        if (get_dfree_info(conn,".",True,&bsize,&dfree,&dsize) == (SMB_BIG_UINT)-1) {
+               reply_unixerror(req, ERRHRD, ERRgeneral);
                END_PROFILE(SMBdskattr);
-               return(UNIXERROR(ERRHRD,ERRgeneral));
+               return;
        }
-  
-       outsize = set_message(inbuf,outbuf,5,0,True);
+
+       reply_outbuf(req, 5, 0);
        
        if (Protocol <= PROTOCOL_LANMAN2) {
                double total_space, free_space;
@@ -1037,21 +1037,21 @@ int reply_dskattr(connection_struct *conn, char *inbuf,char *outbuf, int dum_siz
                if (dsize > 0xFFFF) dsize = 0xFFFF;
                if (dfree > 0xFFFF) dfree = 0xFFFF;
 
-               SSVAL(outbuf,smb_vwv0,dsize);
-               SSVAL(outbuf,smb_vwv1,64); /* this must be 64 for dos systems */
-               SSVAL(outbuf,smb_vwv2,512); /* and this must be 512 */
-               SSVAL(outbuf,smb_vwv3,dfree);
+               SSVAL(req->outbuf,smb_vwv0,dsize);
+               SSVAL(req->outbuf,smb_vwv1,64); /* this must be 64 for dos systems */
+               SSVAL(req->outbuf,smb_vwv2,512); /* and this must be 512 */
+               SSVAL(req->outbuf,smb_vwv3,dfree);
        } else {
-               SSVAL(outbuf,smb_vwv0,dsize);
-               SSVAL(outbuf,smb_vwv1,bsize/512);
-               SSVAL(outbuf,smb_vwv2,512);
-               SSVAL(outbuf,smb_vwv3,dfree);
+               SSVAL(req->outbuf,smb_vwv0,dsize);
+               SSVAL(req->outbuf,smb_vwv1,bsize/512);
+               SSVAL(req->outbuf,smb_vwv2,512);
+               SSVAL(req->outbuf,smb_vwv3,dfree);
        }
 
        DEBUG(3,("dskattr dfree=%d\n", (unsigned int)dfree));
 
        END_PROFILE(SMBdskattr);
-       return(outsize);
+       return;
 }
 
 /****************************************************************************