Use stream->prog instead of a hard-coded
virNetServerProgram. Especially since these functions are intended as
generic helpers for streams.
Signed-off-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk(a)linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
src/remote/remote_daemon_stream.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/remote/remote_daemon_stream.c b/src/remote/remote_daemon_stream.c
index 4dd3af9e0d59..21f0ecd53844 100644
--- a/src/remote/remote_daemon_stream.c
+++ b/src/remote/remote_daemon_stream.c
@@ -213,7 +213,7 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
msg->cb = daemonStreamMessageFinished;
msg->opaque = stream;
stream->refs++;
- if (virNetServerProgramSendStreamData(remoteProgram,
+ if (virNetServerProgramSendStreamData(stream->prog,
client,
msg,
stream->procedure,
@@ -253,7 +253,7 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
if (!msg) {
ret = -1;
} else {
- ret = virNetServerProgramSendStreamError(remoteProgram,
+ ret = virNetServerProgramSendStreamError(stream->prog,
client,
msg,
&rerr,
@@ -644,7 +644,7 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
if (raise_error) {
virNetMessageError rerr;
memset(&rerr, 0, sizeof(rerr));
- return virNetServerProgramSendReplyError(remoteProgram,
+ return virNetServerProgramSendReplyError(stream->prog,
client,
msg,
&rerr,
@@ -839,7 +839,7 @@ daemonStreamHandleRead(virNetServerClientPtr client,
VIR_DEBUG("rv=%d inData=%d length=%lld", rv, inData, length);
if (rv < 0) {
- if (virNetServerProgramSendStreamError(remoteProgram,
+ if (virNetServerProgramSendStreamError(stream->prog,
client,
msg,
&rerr,
@@ -856,7 +856,7 @@ daemonStreamHandleRead(virNetServerClientPtr client,
msg->cb = daemonStreamMessageFinished;
msg->opaque = stream;
stream->refs++;
- if (virNetServerProgramSendStreamHole(remoteProgram,
+ if (virNetServerProgramSendStreamHole(stream->prog,
client,
msg,
stream->procedure,
@@ -887,7 +887,7 @@ daemonStreamHandleRead(virNetServerClientPtr client,
/* Should never get this, since we're only called when we know
* we're readable, but hey things change... */
} else if (rv < 0) {
- if (virNetServerProgramSendStreamError(remoteProgram,
+ if (virNetServerProgramSendStreamError(stream->prog,
client,
msg,
&rerr,
@@ -906,7 +906,7 @@ daemonStreamHandleRead(virNetServerClientPtr client,
msg->cb = daemonStreamMessageFinished;
msg->opaque = stream;
stream->refs++;
- if (virNetServerProgramSendStreamData(remoteProgram,
+ if (virNetServerProgramSendStreamData(stream->prog,
client,
msg,
stream->procedure,
--
2.13.4