]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
umm ya, the thread stack size is in bytes not kbytes
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 20 Dec 2011 23:14:38 +0000 (17:14 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 20 Dec 2011 23:14:38 +0000 (17:14 -0600)
libs/esl/fs_cli.c
libs/esl/src/esl_threadmutex.c

index 108b42cf6e99a2c2c2af527052a797dc04b3f22b..751d9868d21e5203d978f7eeaa4d6a82984b4e29 100644 (file)
@@ -1357,7 +1357,12 @@ int main(int argc, char *argv[])
        }
        global_handle = &handle;
        global_profile = profile;
-       esl_thread_create_detached(msg_thread_run, &handle);
+
+       if (esl_thread_create_detached(msg_thread_run, &handle) != ESL_SUCCESS) {
+               printf("Error starting thread!\n");
+               esl_disconnect(&handle);
+               return 0;
+       }
 
 #ifdef HAVE_EDITLINE
        el = el_init(__FILE__, stdin, stdout, stderr);
index 28007727d62e85d1805acbc56581ed12e5fe5351..34fa6bb96a72d689327eb9cd30a6de7d5557a0d5 100644 (file)
@@ -60,7 +60,7 @@ struct esl_thread {
 #endif
 };
 
-size_t thread_default_stacksize = 240;
+size_t thread_default_stacksize = 240 * 1024;
 
 void esl_thread_override_default_stacksize(size_t size)
 {
@@ -119,7 +119,9 @@ esl_status_t esl_thread_create_detached_ex(esl_thread_function_t func, void *dat
 
        status = ESL_SUCCESS;
        goto done;
+
  failpthread:
+
        pthread_attr_destroy(&thread->attribute);
 #endif