Author: vlendec
Date: 2007-08-14 07:58:56 +0000 (Tue, 14 Aug 2007)
New Revision: 24399

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

Log:
Change change_notify_reply to use send_nt_replies_new

Modified:
   branches/SAMBA_3_2/source/smbd/notify.c
   branches/SAMBA_3_2/source/smbd/nttrans.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/notify.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/notify.c     2007-08-14 07:39:11 UTC (rev 
24398)
+++ branches/SAMBA_3_2/source/smbd/notify.c     2007-08-14 07:58:56 UTC (rev 
24399)
@@ -154,9 +154,8 @@
 void change_notify_reply(const uint8 *request_buf, uint32 max_param,
                         struct notify_change_buf *notify_buf)
 {
-       char *outbuf = NULL;
        prs_struct ps;
-       size_t buflen;
+       struct smb_request *req = NULL;
 
        if (notify_buf->num_changes == -1) {
                change_notify_reply_packet(request_buf, NT_STATUS_OK);
@@ -176,22 +175,18 @@
                goto done;
        }
 
-       buflen = smb_size+38+prs_offset(&ps) + 4 /* padding */;
-
-       if (!(outbuf = SMB_MALLOC_ARRAY(char, buflen))) {
+       if (!(req = talloc(tmp_talloc_ctx(), struct smb_request))) {
                change_notify_reply_packet(request_buf, NT_STATUS_NO_MEMORY);
                goto done;
        }
 
-       construct_reply_common((char *)request_buf, outbuf);
+       init_smb_request(req, request_buf);
 
-       if (send_nt_replies((char *)request_buf, outbuf, buflen, NT_STATUS_OK, 
prs_data_p(&ps),
-                           prs_offset(&ps), NULL, 0) == -1) {
-               exit_server("change_notify_reply_packet: send_smb failed.");
-       }
+       send_nt_replies_new(req, NT_STATUS_OK, prs_data_p(&ps),
+                               prs_offset(&ps), NULL, 0);
 
  done:
-       SAFE_FREE(outbuf);
+       TALLOC_FREE(req);
        prs_mem_free(&ps);
 
        TALLOC_FREE(notify_buf->changes);

Modified: branches/SAMBA_3_2/source/smbd/nttrans.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/nttrans.c    2007-08-14 07:39:11 UTC (rev 
24398)
+++ branches/SAMBA_3_2/source/smbd/nttrans.c    2007-08-14 07:58:56 UTC (rev 
24399)
@@ -67,7 +67,7 @@
  HACK ! Always assumes smb_setup field is zero.
 ****************************************************************************/
 
-int send_nt_replies(const char *inbuf,
+static int send_nt_replies(const char *inbuf,
                        char *outbuf,
                        int bufsize,
                        NTSTATUS nt_error,

Reply via email to