rpc: silence coverity warning

Coverity noted that 4 out of 5 calls to virNetClientStreamRaiseError
checked the return value.  This case expects a particular value, so
warn if our expectations went wrong due to some bug elsewhere.

* src/rpc/virnetclient.c (virNetClientCallDispatchStream): Warn on
  unexpected scenario.
This commit is contained in:
Eric Blake 2011-07-04 10:26:05 +08:00 committed by Daniel Veillard
parent aaea56dc99
commit dd0c42abd4
1 changed files with 2 additions and 1 deletions

View File

@ -602,7 +602,8 @@ static int virNetClientCallDispatchStream(virNetClientPtr client)
if (thecall && thecall->expectReply) {
VIR_DEBUG("Got a synchronous error");
/* Raise error now, so that this call will see it immediately */
virNetClientStreamRaiseError(st);
if (!virNetClientStreamRaiseError(st))
VIR_DEBUG("unable to raise synchronous error");
thecall->mode = VIR_NET_CLIENT_MODE_COMPLETE;
}
return 0;