Changeset 3510
- Timestamp:
- Apr 8, 2011 4:05:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip-apps/src/pjsua/main.c
r3485 r3510 21 21 #include <pjsua-lib/pjsua.h> 22 22 23 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 24 # include <CoreFoundation/CFRunLoop.h> 25 #endif 26 23 27 #define THIS_FILE "main.c" 24 28 … … 28 32 */ 29 33 extern pj_bool_t app_restart; 34 pj_bool_t is_quit = PJ_FALSE; 30 35 pj_status_t app_init(int argc, char *argv[]); 31 36 pj_status_t app_main(void); … … 76 81 #endif 77 82 83 #if defined(PJ_DARWINOS) && PJ_DARWINOS!=0 84 static int main_func(void *data); 85 int argc; 86 char **argv; 87 88 int main(int argcm, char *argvm[]) 89 { 90 pthread_t thread; 91 92 argc = argcm; 93 argv = (char **)argvm; 94 if (pthread_create(&thread, NULL, &main_func, NULL) == 0) { 95 while (!is_quit) { 96 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, false); 97 } 98 } 99 100 return 0; 101 } 102 static int main_func(void *data) 103 #else 78 104 int main(int argc, char *argv[]) 105 #endif 79 106 { 80 107 do { … … 93 120 } while (app_restart); 94 121 122 is_quit = PJ_TRUE; 95 123 return 0; 96 124 }
Note: See TracChangeset
for help on using the changeset viewer.