mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 13:17:51 +03:00
stream: Access stream->prog instead of a hard-coded global variable
Use stream->prog instead of a hard-coded "remoteProgram" since at stream creation in daemonCreateClientStream "remoteProgram" is used so we should use that especially since these functions are intended as generic helpers for streams. Signed-off-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
9f24004b82
commit
8bd0261a72
@ -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,
|
||||
@ -650,7 +650,7 @@ daemonStreamHandleAbort(virNetServerClientPtr client,
|
||||
if (raise_error) {
|
||||
virNetMessageError rerr;
|
||||
memset(&rerr, 0, sizeof(rerr));
|
||||
return virNetServerProgramSendReplyError(remoteProgram,
|
||||
return virNetServerProgramSendReplyError(stream->prog,
|
||||
client,
|
||||
msg,
|
||||
&rerr,
|
||||
@ -845,7 +845,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,
|
||||
@ -862,7 +862,7 @@ daemonStreamHandleRead(virNetServerClientPtr client,
|
||||
msg->cb = daemonStreamMessageFinished;
|
||||
msg->opaque = stream;
|
||||
stream->refs++;
|
||||
if (virNetServerProgramSendStreamHole(remoteProgram,
|
||||
if (virNetServerProgramSendStreamHole(stream->prog,
|
||||
client,
|
||||
msg,
|
||||
stream->procedure,
|
||||
@ -893,7 +893,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,
|
||||
@ -912,7 +912,7 @@ daemonStreamHandleRead(virNetServerClientPtr client,
|
||||
msg->cb = daemonStreamMessageFinished;
|
||||
msg->opaque = stream;
|
||||
stream->refs++;
|
||||
if (virNetServerProgramSendStreamData(remoteProgram,
|
||||
if (virNetServerProgramSendStreamData(stream->prog,
|
||||
client,
|
||||
msg,
|
||||
stream->procedure,
|
||||
|
Loading…
Reference in New Issue
Block a user