diff options
Diffstat (limited to 'common/trans.c')
| -rw-r--r-- | common/trans.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/common/trans.c b/common/trans.c index d73764de..8a271722 100644 --- a/common/trans.c +++ b/common/trans.c @@ -831,6 +831,26 @@ trans_listen_address(struct trans *self, char *port, const char *address) } } } +#if defined(XRDP_ENABLE_VSOCK) + else if (self->mode == TRANS_MODE_VSOCK) /* vsock socket */ + { + self->sck = g_vsock_socket(); + if (self->sck < 0) + return 1; + + g_tcp_set_non_blocking(self->sck); + + if (g_vsock_bind(self->sck, port) == 0) + { + if (g_tcp_listen(self->sck) == 0) + { + self->status = TRANS_STATUS_UP; /* ok */ + self->type1 = TRANS_TYPE_LISTENER; /* listener */ + return 0; + } + } + } +#endif return 1; } |
