From 6180670cd21b69ac1abd3d591dbbe0c29885f9dd Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 12 Jun 2012 08:58:04 +0200 Subject: [PATCH] rpc: Remove unused parameter in virKeepAliveStopInternal The previous commit removed the only usage of ``all'' parameter in virKeepAliveStopInternal, which was actually the only reason for having virKeepAliveStopInternal. This effectively reverts most of commit 6446a9e20cc65561ce6061742baf35a3a63d5ba1. (cherry picked from commit 0ec514b359c88468d2279a43f7577b0fc3a78e08) --- src/probes.d | 2 +- src/rpc/virkeepalive.c | 22 ++++------------------ src/rpc/virkeepalive.h | 1 - src/rpc/virnetclient.c | 2 +- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/src/probes.d b/src/probes.d index e56dc3e264..9d70cc9726 100644 --- a/src/probes.d +++ b/src/probes.d @@ -78,7 +78,7 @@ provider libvirt { probe rpc_keepalive_ref(void *ka, void *client, int refs); probe rpc_keepalive_free(void *ka, void *client, int refs); probe rpc_keepalive_start(void *ka, void *client, int interval, int count); - probe rpc_keepalive_stop(void *ka, void *client, bool all); + probe rpc_keepalive_stop(void *ka, void *client); probe rpc_keepalive_send(void *ka, void *client, int prog, int vers, int proc); probe rpc_keepalive_received(void *ka, void *client, int prog, int vers, int proc); probe rpc_keepalive_timeout(void *ka, void *client, int coundToDeath, int idle); diff --git a/src/rpc/virkeepalive.c b/src/rpc/virkeepalive.c index 7984adad71..70cf31ed9f 100644 --- a/src/rpc/virkeepalive.c +++ b/src/rpc/virkeepalive.c @@ -328,14 +328,14 @@ cleanup: } -static void -virKeepAliveStopInternal(virKeepAlivePtr ka, bool all ATTRIBUTE_UNUSED) +void +virKeepAliveStop(virKeepAlivePtr ka) { virKeepAliveLock(ka); PROBE(RPC_KEEPALIVE_STOP, - "ka=%p client=%p all=%d", - ka, ka->client, all); + "ka=%p client=%p", + ka, ka->client); if (ka->timer > 0) { virEventRemoveTimeout(ka->timer); @@ -346,20 +346,6 @@ virKeepAliveStopInternal(virKeepAlivePtr ka, bool all ATTRIBUTE_UNUSED) } -void -virKeepAliveStop(virKeepAlivePtr ka) -{ - virKeepAliveStopInternal(ka, true); -} - - -void -virKeepAliveStopSending(virKeepAlivePtr ka) -{ - virKeepAliveStopInternal(ka, false); -} - - int virKeepAliveTimeout(virKeepAlivePtr ka) { diff --git a/src/rpc/virkeepalive.h b/src/rpc/virkeepalive.h index 62227d0684..1e2521423b 100644 --- a/src/rpc/virkeepalive.h +++ b/src/rpc/virkeepalive.h @@ -49,7 +49,6 @@ int virKeepAliveStart(virKeepAlivePtr ka, int interval, unsigned int count); void virKeepAliveStop(virKeepAlivePtr ka); -void virKeepAliveStopSending(virKeepAlivePtr ka); int virKeepAliveTimeout(virKeepAlivePtr ka); bool virKeepAliveTrigger(virKeepAlivePtr ka, diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 69ad52e34a..64738c3e97 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -257,7 +257,7 @@ void virNetClientKeepAliveStop(virNetClientPtr client) { virNetClientLock(client); - virKeepAliveStopSending(client->keepalive); + virKeepAliveStop(client->keepalive); virNetClientUnlock(client); }