mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r11712: avoid changing the fde flags unless really needed
(This used to be commit 48e6424b0c
)
This commit is contained in:
parent
cbb7a47cf2
commit
763d862fee
@ -43,7 +43,7 @@ struct packet_context {
|
|||||||
void *private;
|
void *private;
|
||||||
struct fd_event *fde;
|
struct fd_event *fde;
|
||||||
BOOL serialise;
|
BOOL serialise;
|
||||||
BOOL processing;
|
int processing;
|
||||||
BOOL recv_disable;
|
BOOL recv_disable;
|
||||||
BOOL nofree;
|
BOOL nofree;
|
||||||
|
|
||||||
@ -209,6 +209,8 @@ void packet_recv(struct packet_context *pc)
|
|||||||
DATA_BLOB blob;
|
DATA_BLOB blob;
|
||||||
|
|
||||||
if (pc->processing) {
|
if (pc->processing) {
|
||||||
|
EVENT_FD_NOT_READABLE(pc->fde);
|
||||||
|
pc->processing++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,15 +331,16 @@ next_partial:
|
|||||||
pc->packet_size = 0;
|
pc->packet_size = 0;
|
||||||
|
|
||||||
if (pc->serialise) {
|
if (pc->serialise) {
|
||||||
EVENT_FD_NOT_READABLE(pc->fde);
|
pc->processing = 1;
|
||||||
pc->processing = True;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
status = pc->callback(pc->private, blob);
|
status = pc->callback(pc->private, blob);
|
||||||
|
|
||||||
if (pc->serialise) {
|
if (pc->processing) {
|
||||||
EVENT_FD_READABLE(pc->fde);
|
if (pc->processing > 1) {
|
||||||
pc->processing = False;
|
EVENT_FD_READABLE(pc->fde);
|
||||||
|
}
|
||||||
|
pc->processing = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user