]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
client rpc: Drop unused return value of virNetClientSendNonBlock
authorJiri Denemark <jdenemar@redhat.com>
Fri, 8 Jun 2012 13:24:06 +0000 (15:24 +0200)
committerCole Robinson <crobinso@redhat.com>
Mon, 13 Aug 2012 01:15:47 +0000 (21:15 -0400)
As we never drop non-blocking calls, the return value that used to
indicate a call was dropped is no longer needed.
(cherry picked from commit ca9b13e3733195d400effaca0ef13e4545a3b608)

src/rpc/virnetclient.c

index bca0af6fe739e11f181cd3acb608fa5a28c52b30..9022d4869740f366bf2961be42c2c53e79d85ccd 100644 (file)
@@ -1246,8 +1246,8 @@ virNetClientIOEventLoopPassTheBuck(virNetClientPtr client,
  * get a reply to our own call. Then quit and pass the buck
  * to someone else.
  *
- * Returns 2 if fully sent, 1 if partially sent (only for nonBlock==true),
- * 0 if nothing sent (only for nonBlock==true) and -1 on error
+ * Returns 1 if the call was queued and will be completed later (only
+ * for nonBlock==true), 0 if the call was completed and -1 on error.
  */
 static int virNetClientIOEventLoop(virNetClientPtr client,
                                    virNetClientCallPtr thiscall)
@@ -1371,7 +1371,7 @@ static int virNetClientIOEventLoop(virNetClientPtr client,
         if (thiscall->mode == VIR_NET_CLIENT_MODE_COMPLETE) {
             virNetClientCallRemove(&client->waitDispatch, thiscall);
             virNetClientIOEventLoopPassTheBuck(client, thiscall);
-            return 2;
+            return 0;
         }
 
         /* We're not done, but we're non-blocking; keep the call queued */
@@ -1478,8 +1478,8 @@ static void virNetClientIOUpdateCallback(virNetClientPtr client,
  *
  * NB(7) Don't Panic!
  *
- * Returns 2 if fully sent, 1 if partially sent (only for nonBlock==true),
- * 0 if nothing sent (only for nonBlock==true) and -1 on error
+ * Returns 1 if the call was queued and will be completed later (only
+ * for nonBlock==true), 0 if the call was completed and -1 on error.
  */
 static int virNetClientIO(virNetClientPtr client,
                           virNetClientCallPtr thiscall)
@@ -1537,7 +1537,7 @@ static int virNetClientIO(virNetClientPtr client,
          *     our reply
          */
         if (thiscall->mode == VIR_NET_CLIENT_MODE_COMPLETE) {
-            rv = 2;
+            rv = 0;
             /*
              * We avoided catching the buck and our reply is ready !
              * We've already had 'thiscall' removed from the list
@@ -1631,8 +1631,8 @@ done:
 
 
 /*
- * Returns 2 if fully sent, 1 if queued (only for nonBlock==true),
- * 0 if nothing sent (only for nonBlock==true) and -1 on error
+ * Returns 1 if the call was queued and will be completed later (only
+ * for nonBlock==true), 0 if the call was completed and -1 on error.
  */
 static int virNetClientSendInternal(virNetClientPtr client,
                                     virNetMessagePtr msg,
@@ -1757,7 +1757,8 @@ int virNetClientSendNoReply(virNetClientPtr client,
  * The caller is responsible for free'ing @msg, *except* if
  * this method returns 1.
  *
- * Returns 2 on full send, 1 on partial send, 0 on no send, -1 on error
+ * Returns 1 if the message was queued and will be completed later (only
+ * for nonBlock==true), 0 if the message was completed and -1 on error.
  */
 int virNetClientSendNonBlock(virNetClientPtr client,
                              virNetMessagePtr msg)