[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v3 21/31] virNetClientStreamRecvPacket: Introduce @flags argument



Signed-off-by: Michal Privoznik <mprivozn redhat com>
---
 src/remote/remote_driver.c   |  3 ++-
 src/rpc/virnetclientstream.c | 10 +++++++---
 src/rpc/virnetclientstream.h |  3 ++-
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index ff5be6ebb..63daec587 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -5665,7 +5665,8 @@ remoteStreamRecvFlags(virStreamPtr st,
                                       priv->client,
                                       data,
                                       nbytes,
-                                      (st->flags & VIR_STREAM_NONBLOCK));
+                                      (st->flags & VIR_STREAM_NONBLOCK),
+                                      flags);
 
     VIR_DEBUG("Done %d", rv);
 
diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c
index 2f4f92a96..4a3d843b1 100644
--- a/src/rpc/virnetclientstream.c
+++ b/src/rpc/virnetclientstream.c
@@ -456,13 +456,17 @@ int virNetClientStreamRecvPacket(virNetClientStreamPtr st,
                                  virNetClientPtr client,
                                  char *data,
                                  size_t nbytes,
-                                 bool nonblock)
+                                 bool nonblock,
+                                 unsigned int flags)
 {
     int rv = -1;
     size_t want;
 
-    VIR_DEBUG("st=%p client=%p data=%p nbytes=%zu nonblock=%d",
-              st, client, data, nbytes, nonblock);
+    VIR_DEBUG("st=%p client=%p data=%p nbytes=%zu nonblock=%d flags=%x",
+              st, client, data, nbytes, nonblock, flags);
+
+    virCheckFlags(0, -1);
+
     virObjectLock(st);
     if (!st->rx && !st->incomingEOF) {
         virNetMessagePtr msg;
diff --git a/src/rpc/virnetclientstream.h b/src/rpc/virnetclientstream.h
index c25c69bb1..1774e5ac3 100644
--- a/src/rpc/virnetclientstream.h
+++ b/src/rpc/virnetclientstream.h
@@ -59,7 +59,8 @@ int virNetClientStreamRecvPacket(virNetClientStreamPtr st,
                                  virNetClientPtr client,
                                  char *data,
                                  size_t nbytes,
-                                 bool nonblock);
+                                 bool nonblock,
+                                 unsigned int flags);
 
 int virNetClientStreamSendHole(virNetClientStreamPtr st,
                                virNetClientPtr client,
-- 
2.13.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]