Skip to content

Commit

Permalink
IPC: only modify the dispatch if we get EAGAIN
Browse files Browse the repository at this point in the history
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
  • Loading branch information
asalkeld committed May 16, 2012
1 parent a441110 commit 78374c2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lib/ipcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,14 @@ new_event_notification(struct qb_ipcs_connection * c)
c->outstanding_notifiers++;
} else {
res = qb_ipc_us_send(&c->setup, &c->outstanding_notifiers, 1);
if (res == 1) {
return res;
if (res == -EAGAIN) {
/*
* notify the client later, when we can.
*/
c->outstanding_notifiers++;
c->poll_events = POLLOUT | POLLIN | POLLPRI | POLLNVAL;
(void)_modify_dispatch_descriptor_(c);
}
/*
* notify the client later, when we can.
*/
c->outstanding_notifiers++;
c->poll_events = POLLOUT | POLLIN | POLLPRI | POLLNVAL;
(void)_modify_dispatch_descriptor_(c);
}
return res;
}
Expand Down

0 comments on commit 78374c2

Please sign in to comment.