You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/02/14 18:33:26 UTC
[3/3] qpid-proton git commit: PROTON-1403: c libuv proactor missing
writable transition on SASL
PROTON-1403: c libuv proactor missing writable transition on SASL
Regression from previous fixes, the libuv proactor was missing the event-less
writable transition when the engine receives an incoming SASL header.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/39c70d11
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/39c70d11
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/39c70d11
Branch: refs/heads/master
Commit: 39c70d11e16275df0f356601a1e355388290b97e
Parents: 6291a75
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Feb 14 13:30:21 2017 -0500
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Feb 14 13:30:21 2017 -0500
----------------------------------------------------------------------
proton-c/src/proactor/libuv.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/39c70d11/proton-c/src/proactor/libuv.c
----------------------------------------------------------------------
diff --git a/proton-c/src/proactor/libuv.c b/proton-c/src/proactor/libuv.c
index 173f767..d17136a 100644
--- a/proton-c/src/proactor/libuv.c
+++ b/proton-c/src/proactor/libuv.c
@@ -493,8 +493,7 @@ static void on_read(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) {
assert(pc->psocket.state == ON_UV);
if (nread >= 0) {
pn_connection_driver_read_done(&pc->driver, nread);
- on_tick(&pc->timer); /* check for tick changes. */
- /* Reading continues automatically until stopped. */
+ leader_unwatch(&pc->psocket); /* Handle events */
} else if (nread == UV_EOF) { /* hangup */
pn_connection_driver_read_close(&pc->driver);
leader_unwatch(&pc->psocket);
@@ -535,7 +534,7 @@ static void alloc_read_buffer(uv_handle_t* stream, size_t size, uv_buf_t* buf) {
/* Monitor a socket in the UV loop */
static void leader_watch(psocket_t *ps) {
- assert(ps->state == ON_LEADER);
+ assert(ps->state != ON_WORKER);
int err = 0;
set_state(ps, ON_UV, NULL); /* Assume we are going to UV loop unless sent to worker or leader. */
@@ -593,12 +592,8 @@ static void leader_unwatch(psocket_t *ps) {
if (ps->is_conn) {
pconnection_t *pc = as_pconnection(ps);
if (!pn_connection_driver_has_event(&pc->driver)) {
- /* Don't return an empty event batch */
- if (ps->state == ON_UV) {
- return; /* Just leave it in the UV loop */
- } else {
- leader_watch(ps); /* Re-attach to UV loop */
- }
+ /* Don't return an empty event batch, re-attach to UV loop */
+ leader_watch(ps);
return;
} else {
if (pc->writing) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org