Reloaded : Fix autoconnect (MT)

Connect client at first available server and
try to connect multitrack to all existing server.
This commit is contained in:
[d.j.a.y] Jerome Blanchi
2016-03-31 09:17:51 +02:00
parent 952d214e66
commit 735ed7ae64

View File

@@ -7430,15 +7430,17 @@ void vj_gui_init(char *glade_file,
veejay_memset( &info->watch, 0, sizeof(watchdog_t)); veejay_memset( &info->watch, 0, sizeof(watchdog_t));
info->watch.state = STATE_WAIT_FOR_USER; // info->watch.state = STATE_WAIT_FOR_USER; //
//connect client at first available server
//and try to connect multitrack to all existing server
if( auto_connect ) if( auto_connect )
{ {
for( i = DEFAULT_PORT_NUM; i < 9999; i+= 1000 ) for( i = DEFAULT_PORT_NUM; i < 9999; i+= 1000 )
{ {
if (multrack_audoadd( gui->mt, "localhost", i) != -1) if (multrack_audoadd( gui->mt, "localhost", i) != -1 && auto_connect)
{ {
update_spin_value( "button_portnum", i ); update_spin_value( "button_portnum", i );
info->watch.state = STATE_CONNECT; info->watch.state = STATE_CONNECT;
break; auto_connect = 0;
} }
} }
} }