- Timestamp:
- Oct 19, 2011 1:08:14 PM (13 years ago)
- Location:
- pjproject/branches/1.x
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/1.x/pjsip-apps/src/pjsua/pjsua_app.c
r3829 r3830 5119 5119 } 5120 5120 5121 status = pjsua_destroy 2(1);5121 status = pjsua_destroy(); 5122 5122 5123 5123 pj_bzero(&app_config, sizeof(app_config)); -
pjproject/branches/1.x/pjsip/include/pjsua-lib/pjsua.h
r3829 r3830 1300 1300 { 1301 1301 /** 1302 * Do not invoke any networking functions. 1303 */ 1304 PJSUA_DESTROY_NO_NETWORK = 1 1302 * Allow sending outgoing messages (such as unregistration, event 1303 * unpublication, BYEs, unsubscription, etc.), but do not wait for 1304 * responses. This is useful to perform "best effort" clean up 1305 * without delaying the shutdown process waiting for responses. 1306 */ 1307 PJSUA_DESTROY_NO_RX_MSG = 1, 1308 1309 /** 1310 * If this flag is set, do not send any outgoing messages at all. 1311 * This flag is useful if application knows that the network which 1312 * the messages are to be sent on is currently down. 1313 */ 1314 PJSUA_DESTROY_NO_TX_MSG = 2, 1315 1316 /** 1317 * Do not send or receive messages during destroy. This flag is 1318 * shorthand for PJSUA_DESTROY_NO_RX_MSG + PJSUA_DESTROY_NO_TX_MSG. 1319 */ 1320 PJSUA_DESTROY_NO_NETWORK = PJSUA_DESTROY_NO_RX_MSG | 1321 PJSUA_DESTROY_NO_TX_MSG 1305 1322 1306 1323 } pjsua_destroy_flag; -
pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_core.c
r3829 r3830 1306 1306 1307 1307 /* Terminate all calls. */ 1308 if ((flags & PJSUA_DESTROY_NO_ NETWORK) == 0) {1308 if ((flags & PJSUA_DESTROY_NO_TX_MSG) == 0) { 1309 1309 pjsua_call_hangup_all(); 1310 1310 } … … 1336 1336 } 1337 1337 1338 /* No need to wait if we didn't send anything*/1339 if (flags & PJSUA_DESTROY_NO_ NETWORK) {1338 /* No waiting if RX is disabled */ 1339 if (flags & PJSUA_DESTROY_NO_RX_MSG) { 1340 1340 max_wait = 0; 1341 1341 } … … 1370 1370 continue; 1371 1371 1372 if (pjsua_var.acc[i].regc && (flags & PJSUA_DESTROY_NO_ NETWORK)==0)1372 if (pjsua_var.acc[i].regc && (flags & PJSUA_DESTROY_NO_TX_MSG)==0) 1373 1373 { 1374 1374 pjsua_acc_set_registration(i, PJ_FALSE); … … 1396 1396 } 1397 1397 1398 /* No need to wait if we didn't send anything*/1399 if (flags & PJSUA_DESTROY_NO_ NETWORK) {1398 /* No waiting if RX is disabled */ 1399 if (flags & PJSUA_DESTROY_NO_RX_MSG) { 1400 1400 max_wait = 0; 1401 1401 } … … 1421 1421 * transports shutdown to complete: 1422 1422 */ 1423 if (i < 20 && (flags & PJSUA_DESTROY_NO_ NETWORK) == 0) {1423 if (i < 20 && (flags & PJSUA_DESTROY_NO_RX_MSG) == 0) { 1424 1424 busy_sleep(1000 - i*50); 1425 1425 } -
pjproject/branches/1.x/pjsip/src/pjsua-lib/pjsua_pres.c
r3829 r3830 1285 1285 acc->online_status = PJ_FALSE; 1286 1286 1287 if ((flags & PJSUA_DESTROY_NO_ NETWORK) == 0) {1287 if ((flags & PJSUA_DESTROY_NO_TX_MSG) == 0) { 1288 1288 send_publish(acc->index, PJ_FALSE); 1289 1289 } … … 1323 1323 pjsip_pres_set_status(uapres->sub, &pres_status); 1324 1324 1325 if ((flags & PJSUA_DESTROY_NO_ NETWORK) == 0) {1325 if ((flags & PJSUA_DESTROY_NO_TX_MSG) == 0) { 1326 1326 if (pjsip_pres_notify(uapres->sub, 1327 1327 PJSIP_EVSUB_STATE_TERMINATED, NULL, … … 2282 2282 } 2283 2283 2284 if ((flags & PJSUA_DESTROY_NO_ NETWORK) == 0) {2284 if ((flags & PJSUA_DESTROY_NO_TX_MSG) == 0) { 2285 2285 refresh_client_subscriptions(); 2286 2286
Note: See TracChangeset
for help on using the changeset viewer.