svn commit: samba r14807 - in
branches/SAMBA_4_0/source/smb_server/smb: .
tridge at samba.org
tridge at samba.org
Thu Mar 30 08:44:28 GMT 2006
Author: tridge
Date: 2006-03-30 08:44:28 +0000 (Thu, 30 Mar 2006)
New Revision: 14807
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14807
Log:
fixed the format of notify responses (forgot to commit this earlier)
Modified:
branches/SAMBA_4_0/source/smb_server/smb/nttrans.c
Changeset:
Modified: branches/SAMBA_4_0/source/smb_server/smb/nttrans.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb/nttrans.c 2006-03-30 08:31:39 UTC (rev 14806)
+++ branches/SAMBA_4_0/source/smb_server/smb/nttrans.c 2006-03-30 08:44:28 UTC (rev 14807)
@@ -346,7 +346,6 @@
size_t size = 0;
int i;
NTSTATUS status;
- uint32_t ofs=0;
uint8_t *p;
#define MAX_BYTES_PER_CHAR 3
@@ -362,14 +361,16 @@
/* construct the changes buffer */
for (i=0;i<info->out.num_changes;i++) {
+ uint32_t ofs;
ssize_t len;
SIVAL(p, 4, info->out.changes[i].action);
len = push_string(p + 12, info->out.changes[i].name.s,
- op->trans->out.params.length - (ofs+12), STR_UNICODE);
+ op->trans->out.params.length -
+ (p+12 - op->trans->out.params.data), STR_UNICODE);
SIVAL(p, 8, len);
- ofs += len + 12;
+ ofs = len + 12;
if (ofs & 3) {
int pad = 4 - (ofs & 3);
@@ -377,12 +378,16 @@
ofs += pad;
}
- SIVAL(p, 0, ofs);
+ if (i == info->out.num_changes-1) {
+ SIVAL(p, 0, 0);
+ } else {
+ SIVAL(p, 0, ofs);
+ }
- p = op->trans->out.params.data + ofs;
+ p += ofs;
}
- op->trans->out.params.length = ofs;
+ op->trans->out.params.length = p - op->trans->out.params.data;
return NT_STATUS_OK;
}
More information about the samba-cvs
mailing list