FSPHONE-1

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16302 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
João Mesquita
2010-01-14 05:05:32 +00:00
parent bc835175ba
commit e78063d0cb
4 changed files with 126 additions and 14 deletions

View File

@@ -39,7 +39,7 @@ FSHost::FSHost(QObject *parent) :
QThread(parent)
{
/* Initialize libs & globals */
printf("Initializing globals...\n");
qDebug() << "Initializing globals..." << endl;
switch_core_setrlimits();
switch_core_set_globals();
@@ -116,14 +116,14 @@ void FSHost::run(void)
createFolders();
/* If you need to override configuration directories, you need to change them in the SWITCH_GLOBAL_dirs global structure */
printf("Initializing core...\n");
qDebug() << "Initializing core..." << endl;
/* Initialize the core and load modules, that will startup FS completely */
if (switch_core_init(flags, console, &err) != SWITCH_STATUS_SUCCESS) {
fprintf(stderr, "Failed to initialize FreeSWITCH's core: %s\n", err);
emit coreLoadingError(err);
}
printf("Everything OK, Entering runtime loop.\n");
qDebug() << "Everything OK, Entering runtime loop ..." << endl;
if (switch_event_bind("FSHost", SWITCH_EVENT_ALL, SWITCH_EVENT_SUBCLASS_ANY, eventHandlerCallback, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
@@ -153,7 +153,7 @@ void FSHost::run(void)
destroy_status = switch_core_destroy();
if (destroy_status == SWITCH_STATUS_SUCCESS)
{
printf("We have properly shutdown the core.\n");
qDebug() << "We have properly shutdown the core." << endl;
}
}