svn commit: samba r11712 - in branches/SAMBA_4_0/source/lib/stream:
.
tridge at samba.org
tridge at samba.org
Mon Nov 14 02:45:28 GMT 2005
Author: tridge
Date: 2005-11-14 02:45:28 +0000 (Mon, 14 Nov 2005)
New Revision: 11712
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11712
Log:
avoid changing the fde flags unless really needed
Modified:
branches/SAMBA_4_0/source/lib/stream/packet.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/stream/packet.c
===================================================================
--- branches/SAMBA_4_0/source/lib/stream/packet.c 2005-11-14 01:50:55 UTC (rev 11711)
+++ branches/SAMBA_4_0/source/lib/stream/packet.c 2005-11-14 02:45:28 UTC (rev 11712)
@@ -43,7 +43,7 @@
void *private;
struct fd_event *fde;
BOOL serialise;
- BOOL processing;
+ int processing;
BOOL recv_disable;
BOOL nofree;
@@ -209,6 +209,8 @@
DATA_BLOB blob;
if (pc->processing) {
+ EVENT_FD_NOT_READABLE(pc->fde);
+ pc->processing++;
return;
}
@@ -329,15 +331,16 @@
pc->packet_size = 0;
if (pc->serialise) {
- EVENT_FD_NOT_READABLE(pc->fde);
- pc->processing = True;
+ pc->processing = 1;
}
status = pc->callback(pc->private, blob);
- if (pc->serialise) {
- EVENT_FD_READABLE(pc->fde);
- pc->processing = False;
+ if (pc->processing) {
+ if (pc->processing > 1) {
+ EVENT_FD_READABLE(pc->fde);
+ }
+ pc->processing = 0;
}
if (!NT_STATUS_IS_OK(status)) {
More information about the samba-cvs
mailing list