move test to after db's inited to avoid crash

This commit is contained in:
Eric House 2018-07-13 18:20:56 -07:00
parent 5d6c743087
commit 89ec7987e6

View file

@ -1914,11 +1914,6 @@ cursesmain( XP_Bool isServer, LaunchParams* params )
setupUtil( &g_globals.cGlobals );
setupCursesUtilCallbacks( &g_globals, g_globals.cGlobals.util );
if ( params->runSMSTest ) {
smsproto_runTests(g_globals.cGlobals.util->mpool,
g_globals.cGlobals.params->dutil );
}
initFromParams( &g_globals.cGlobals, params );
#ifdef XWFEATURE_RELAY
@ -2044,6 +2039,11 @@ cursesmain( XP_Bool isServer, LaunchParams* params )
};
linux_sms_init( params, myPhone, myPort, &smsProcs, &g_globals.cGlobals );
}
if ( params->runSMSTest ) {
smsproto_runTests(g_globals.cGlobals.util->mpool,
g_globals.cGlobals.params->dutil );
}
#endif
XWStreamCtxt* stream = NULL;