mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +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 {
|
||||
virStreamPtr st;
|
||||
virStreamEventCallback cb;
|
||||
@ -5890,6 +5920,7 @@ static virStreamDriver remoteStreamDrv = {
|
||||
.streamRecvFlags = remoteStreamRecvFlags,
|
||||
.streamSend = remoteStreamSend,
|
||||
.streamSendHole = remoteStreamSendHole,
|
||||
.streamRecvHole = remoteStreamRecvHole,
|
||||
.streamFinish = remoteStreamFinish,
|
||||
.streamAbort = remoteStreamAbort,
|
||||
.streamEventAddCallback = remoteStreamEventAddCallback,
|
||||
|
Loading…
Reference in New Issue
Block a user