- Timestamp:
- Jun 19, 2014 8:06:50 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r4860 r4861 798 798 /* Init PJLIB-UTIL: */ 799 799 status = pjlib_util_init(); 800 PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 800 if (status != PJ_SUCCESS) { 801 pj_log_pop_indent(); 802 pjsua_perror(THIS_FILE, "Failed in initializing pjlib-util", status); 803 pj_shutdown(); 804 return status; 805 } 801 806 802 807 /* Init PJNATH */ 803 808 status = pjnath_init(); 804 PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 809 if (status != PJ_SUCCESS) { 810 pj_log_pop_indent(); 811 pjsua_perror(THIS_FILE, "Failed in initializing pjnath", status); 812 pj_shutdown(); 813 return status; 814 } 805 815 806 816 /* Set default sound device ID */ … … 817 827 /* Create memory pool for application. */ 818 828 pjsua_var.pool = pjsua_pool_create("pjsua", 1000, 1000); 829 if (pjsua_var.pool == NULL) { 830 pj_log_pop_indent(); 831 status = PJ_ENOMEM; 832 pjsua_perror(THIS_FILE, "Unable to create pjsua pool", status); 833 pj_shutdown(); 834 return status; 835 } 819 836 820 PJ_ASSERT_RETURN(pjsua_var.pool, PJ_ENOMEM);821 822 837 /* Create mutex */ 823 838 status = pj_mutex_create_recursive(pjsua_var.pool, "pjsua", … … 826 841 pj_log_pop_indent(); 827 842 pjsua_perror(THIS_FILE, "Unable to create mutex", status); 843 pjsua_destroy(); 828 844 return status; 829 845 } … … 835 851 pj_gethostname()->ptr, 836 852 &pjsua_var.endpt); 837 PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 853 if (status != PJ_SUCCESS) { 854 pj_log_pop_indent(); 855 pjsua_perror(THIS_FILE, "Unable to create endpoint", status); 856 pjsua_destroy(); 857 return status; 858 } 838 859 839 860 /* Init timer entry list */ … … 846 867 pj_log_pop_indent(); 847 868 pjsua_perror(THIS_FILE, "Unable to create mutex", status); 869 pjsua_destroy(); 848 870 return status; 849 871 } … … 1126 1148 1127 1149 on_error: 1128 pjsua_destroy();1129 1150 pj_log_pop_indent(); 1130 1151 return status;
Note: See TracChangeset
for help on using the changeset viewer.