From: Jeremy Allison Date: Fri, 6 Jul 2007 21:46:43 +0000 (+0000) Subject: r23735: Second part of the bugfix for #4763 X-Git-Tag: samba-4.0.0alpha6~801^2~5460 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=10c83ace04f675eb88e9686725795b0e965510e8;hp=c05cbbe41c7512e67fd23f91ad15a9222a4954a6;ds=sidebyside r23735: Second part of the bugfix for #4763 This should coalesce identical adjacent notify records - making the "too large" bug very rare indeed. Please test. Jeremy. (This used to be commit 1aaa1f5bbe9222acbe3dea1daa1c6c5ce72e1c2c) --- diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index 746a8f47e5c..cbafeccd943 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -50,6 +50,17 @@ struct notify_mid_map { uint16 mid; }; +static BOOL notify_change_record_identical(struct notify_change *c1, + struct notify_change *c2) +{ + /* Note this is deliberately case sensitive. */ + if (c1->action == c2->action && + strcmp(c1->name, c2->name) == 0) { + return True; + } + return False; +} + static BOOL notify_marshall_changes(int num_changes, struct notify_change *changes, prs_struct *ps) @@ -58,11 +69,20 @@ static BOOL notify_marshall_changes(int num_changes, UNISTR uni_name; for (i=0; iname, strlen(c->name)+1, &uni_name.buffer, True);