Author: vlendec Date: 2007-08-05 11:19:24 +0000 (Sun, 05 Aug 2007) New Revision: 24243
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24243 Log: Remove reply_prep_legacy from api_reply Modified: branches/SAMBA_3_2/source/smbd/ipc.c branches/SAMBA_3_2/source/smbd/lanman.c Changeset: Modified: branches/SAMBA_3_2/source/smbd/ipc.c =================================================================== --- branches/SAMBA_3_2/source/smbd/ipc.c 2007-08-05 10:57:04 UTC (rev 24242) +++ branches/SAMBA_3_2/source/smbd/ipc.c 2007-08-05 11:19:24 UTC (rev 24243) @@ -375,20 +375,10 @@ DEBUG(3,("named pipe command on <%s> name\n", name)); if (strequal(name,"LANMAN")) { - char *inbuf, *outbuf; - int size, bufsize; - - if (!reply_prep_legacy(req, &inbuf, &outbuf, &size, &bufsize)) { - reply_nterror(req, NT_STATUS_NO_MEMORY); - return; - } - - reply_post_legacy( - req, - api_reply(conn, vuid, inbuf, outbuf, - data, params, - tdscnt, tpscnt, - mdrcnt, mprcnt)); + api_reply(conn, vuid, req, + data, params, + tdscnt, tpscnt, + mdrcnt, mprcnt); return; } Modified: branches/SAMBA_3_2/source/smbd/lanman.c =================================================================== --- branches/SAMBA_3_2/source/smbd/lanman.c 2007-08-05 10:57:04 UTC (rev 24242) +++ branches/SAMBA_3_2/source/smbd/lanman.c 2007-08-05 11:19:24 UTC (rev 24243) @@ -4366,16 +4366,11 @@ Handle remote api calls. ****************************************************************************/ -int api_reply(connection_struct *conn, - uint16 vuid, - const char *inbuf, - char *outbuf, - char *data, - char *params, - int tdscnt, - int tpscnt, - int mdrcnt, - int mprcnt) +void api_reply(connection_struct *conn, uint16 vuid, + struct smb_request *req, + char *data, char *params, + int tdscnt, int tpscnt, + int mdrcnt, int mprcnt) { int api_command; char *rdata = NULL; @@ -4389,11 +4384,13 @@ if (!params) { DEBUG(0,("ERROR: NULL params in api_reply()\n")); - return 0; + reply_nterror(req, NT_STATUS_INVALID_PARAMETER); + return; } if (tpscnt < 2) { - return 0; + reply_nterror(req, NT_STATUS_INVALID_PARAMETER); + return; } api_command = SVAL(params,0); /* Is there a string at position params+2 ? */ @@ -4426,7 +4423,8 @@ user_struct *user = get_valid_user_struct(vuid); if (!user || user->guest) { - return ERROR_NT(NT_STATUS_ACCESS_DENIED); + reply_nterror(req, NT_STATUS_ACCESS_DENIED); + return; } } @@ -4444,7 +4442,8 @@ DEBUG(0,("api_reply: malloc fail !\n")); SAFE_FREE(rdata); SAFE_FREE(rparam); - return -1; + reply_nterror(req, NT_STATUS_NO_MEMORY); + return; } reply = api_commands[i].fn(conn, @@ -4468,16 +4467,11 @@ /* If api_Unsupported returns false we can't return anything. */ if (reply) { - send_trans_reply(inbuf, - outbuf, - rparam, - rparam_len, - rdata, - rdata_len, - False); + send_trans_reply_new(req, rparam, rparam_len, + rdata, rdata_len, False); } SAFE_FREE(rdata); SAFE_FREE(rparam); - return -1; + return; }
