Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
g_debug(LGPFX "Stop RpcOut channel and try to send again ...\n");
funcs->stopRpcOut(chan);
if (RpcChannel_Start(chan)) {
+ /* The channel may get switched from vsocket to backdoor */
+ funcs = chan->funcs;
+ ASSERT(funcs->send);
ok = funcs->send(chan, data, dataLen, &res, &resLen);
goto done;
}
* Close the channel
*
* Result
- * TRUE on success
- * FALSE on failure
+ * None
*
* Side-effects
* None.
*-----------------------------------------------------------------------------
*/
-static gboolean
+static void
VSockOutStop(VSockOut *out) // IN
{
ASSERT(out);
Socket_Close(out->fd);
out->fd = INVALID_SOCKET;
}
-
- return TRUE;
}
VSockChannelStopRpcOut(RpcChannel *chan)
{
VSockChannel *vsock = chan->_private;
- return VSockOutStop(vsock->out);
+ VSockOutStop(vsock->out);
+ chan->outStarted = FALSE;
+
+ return TRUE;
}