From: Sreedhar Kodali Date: Thu, 18 Sep 2014 09:05:42 +0000 (+0530) Subject: While waiting for a completion event, rsocket state is incorrectly X-Git-Tag: v1.0.20~11 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=4eea770ea0bfc42e9c43b4fa8bf71c35cf39ae90;p=~shefty%2Flibrdmacm.git While waiting for a completion event, rsocket state is incorrectly set to error when interrupted. Instead, the caller of get completion event should decide what to do with it based on errno. The fix is do not change the state to rs_error when errno is EINTR inside get completion event. Signed-off-by: Sreedhar Kodali Reviewed-by: Pradeep Satyanarayana Signed-off-by: Sean Hefty --- diff --git a/src/rsocket.c b/src/rsocket.c index ba188a5a..074fb187 100644 --- a/src/rsocket.c +++ b/src/rsocket.c @@ -1978,7 +1978,7 @@ static int rs_get_cq_event(struct rsocket *rs) rs->unack_cqe = 0; } rs->cq_armed = 0; - } else if (errno != EAGAIN) { + } else if (!(errno == EAGAIN || errno == EINTR)) { rs->state = rs_error; }