Author: vlendec Date: 2007-07-30 10:30:19 +0000 (Mon, 30 Jul 2007) New Revision: 24079
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24079 Log: Convert reply_dskattr 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 10:23:26 UTC (rev 24078) +++ branches/SAMBA_3_2/source/smbd/process.c 2007-07-30 10:30:19 UTC (rev 24079) @@ -762,7 +762,7 @@ /* 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}, Modified: branches/SAMBA_3_2/source/smbd/reply.c =================================================================== --- branches/SAMBA_3_2/source/smbd/reply.c 2007-07-30 10:23:26 UTC (rev 24078) +++ branches/SAMBA_3_2/source/smbd/reply.c 2007-07-30 10:30:19 UTC (rev 24079) @@ -1007,18 +1007,18 @@ 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 @@ 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; } /****************************************************************************