mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 18:03:32 +00:00
remote: Implement virStreamRecvHole
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
57760ec1e2
commit
d6e5347ce3
@ -5715,6 +5715,36 @@ remoteStreamSendHole(virStreamPtr st,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
remoteStreamRecvHole(virStreamPtr st,
|
||||||
|
long long *length,
|
||||||
|
unsigned int flags)
|
||||||
|
{
|
||||||
|
struct private_data *priv = st->conn->privateData;
|
||||||
|
virNetClientStreamPtr privst = st->privateData;
|
||||||
|
int rv;
|
||||||
|
|
||||||
|
VIR_DEBUG("st=%p length=%p flags=%x",
|
||||||
|
st, length, flags);
|
||||||
|
|
||||||
|
virCheckFlags(0, -1);
|
||||||
|
|
||||||
|
if (virNetClientStreamRaiseError(privst))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
remoteDriverLock(priv);
|
||||||
|
priv->localUses++;
|
||||||
|
remoteDriverUnlock(priv);
|
||||||
|
|
||||||
|
rv = virNetClientStreamRecvHole(priv->client, privst, length);
|
||||||
|
|
||||||
|
remoteDriverLock(priv);
|
||||||
|
priv->localUses--;
|
||||||
|
remoteDriverUnlock(priv);
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct remoteStreamCallbackData {
|
struct remoteStreamCallbackData {
|
||||||
virStreamPtr st;
|
virStreamPtr st;
|
||||||
virStreamEventCallback cb;
|
virStreamEventCallback cb;
|
||||||
@ -5890,6 +5920,7 @@ static virStreamDriver remoteStreamDrv = {
|
|||||||
.streamRecvFlags = remoteStreamRecvFlags,
|
.streamRecvFlags = remoteStreamRecvFlags,
|
||||||
.streamSend = remoteStreamSend,
|
.streamSend = remoteStreamSend,
|
||||||
.streamSendHole = remoteStreamSendHole,
|
.streamSendHole = remoteStreamSendHole,
|
||||||
|
.streamRecvHole = remoteStreamRecvHole,
|
||||||
.streamFinish = remoteStreamFinish,
|
.streamFinish = remoteStreamFinish,
|
||||||
.streamAbort = remoteStreamAbort,
|
.streamAbort = remoteStreamAbort,
|
||||||
.streamEventAddCallback = remoteStreamEventAddCallback,
|
.streamEventAddCallback = remoteStreamEventAddCallback,
|
||||||
|
Loading…
Reference in New Issue
Block a user