summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_mm.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2009-08-23 00:28:57 +0000
committerjsorg71 <jsorg71>2009-08-23 00:28:57 +0000
commit9e73bbb9aec90592765f147cda2ae647736155cb (patch)
treecbd01aef7613c1fbe7f24e38f0c10d7e75ceef47 /xrdp/xrdp_mm.c
parent1498f0377dd742400134c297da1062243ed4de01 (diff)
downloadxrdp-proprietary-9e73bbb9aec90592765f147cda2ae647736155cb.tar.gz
xrdp-proprietary-9e73bbb9aec90592765f147cda2ae647736155cb.zip
try to connect to chansrv up to 4 times
Diffstat (limited to 'xrdp/xrdp_mm.c')
-rw-r--r--xrdp/xrdp_mm.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index 4a32e3f6..c478d689 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -731,6 +731,7 @@ xrdp_mm_process_login_response(struct xrdp_mm* self, struct stream* s)
int ok;
int display;
int rv;
+ int index;
char text[256];
rv = 0;
@@ -754,11 +755,17 @@ xrdp_mm_process_login_response(struct xrdp_mm* self, struct stream* s)
self->chan_trans->header_size = 8;
self->chan_trans->callback_data = self;
g_snprintf(text, 255, "%d", 7200 + display);
- if (trans_connect(self->chan_trans, "127.0.0.1", text, 3000) == 0)
+ /* try to connect up to 4 times */
+ for (index = 0; index < 4; index++)
{
- self->chan_trans_up = 1;
+ if (trans_connect(self->chan_trans, "127.0.0.1", text, 3000) == 0)
+ {
+ self->chan_trans_up = 1;
+ break;
+ }
+ g_sleep(250);
}
- else
+ if (!(self->chan_trans_up))
{
g_writeln("xrdp_mm_process_login_response: error in trans_connect "
"chan");