Since it's introduction in
v0.9.7-147-gf4324e3292 the
virNetServerClientInitKeepAlive() function returned nothing than
a negative one. Fortunately, this did not pose any problem
because we ignored the retval happily. Well, it's time to check
for the retval because the function might fail regularly.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
virNetServerDispatchNewMessage,
srv);
- virNetServerClientInitKeepAlive(client, srv->keepaliveInterval,
- srv->keepaliveCount);
+ if (virNetServerClientInitKeepAlive(client, srv->keepaliveInterval,
+ srv->keepaliveCount) < 0)
+ goto error;
virObjectUnlock(srv);
return 0;
virObjectRef(client);
client->keepalive = ka;
-
+ ret = 0;
cleanup:
virObjectUnlock(client);