try to connect to chansrv up to 4 times

ulab-original
jsorg71 15 years ago
parent 1498f0377d
commit 9e73bbb9ae

@ -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);
/* try to connect up to 4 times */
for (index = 0; index < 4; index++)
{
if (trans_connect(self->chan_trans, "127.0.0.1", text, 3000) == 0)
{
self->chan_trans_up = 1;
break;
}
else
g_sleep(250);
}
if (!(self->chan_trans_up))
{
g_writeln("xrdp_mm_process_login_response: error in trans_connect "
"chan");

Loading…
Cancel
Save