1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-09 20:23:51 +03:00

r11712: avoid changing the fde flags unless really needed

This commit is contained in:
Andrew Tridgell
2005-11-14 02:45:28 +00:00
committed by Gerald (Jerry) Carter
parent d87df5fe8e
commit 48e6424b0c

View File

@@ -43,7 +43,7 @@ struct packet_context {
void *private;
struct fd_event *fde;
BOOL serialise;
BOOL processing;
int processing;
BOOL recv_disable;
BOOL nofree;
@@ -209,6 +209,8 @@ void packet_recv(struct packet_context *pc)
DATA_BLOB blob;
if (pc->processing) {
EVENT_FD_NOT_READABLE(pc->fde);
pc->processing++;
return;
}
@@ -329,15 +331,16 @@ next_partial:
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)) {