Changeset 1400 for pjproject/trunk
- Timestamp:
- Jun 28, 2007 7:15:03 AM (17 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r1399 r1400 2421 2421 } else if (menuin[1] == 'a') { 2422 2422 2423 printf("Sorry, this command is not supported yet\n"); 2423 char id[80], registrar[80], realm[80], uname[80], passwd[30]; 2424 pjsua_acc_config acc_cfg; 2425 pj_status_t status; 2426 2427 if (!simple_input("Your SIP URL:", id, sizeof(id))) 2428 break; 2429 if (!simple_input("URL of the registrar:", registrar, sizeof(registrar))) 2430 break; 2431 if (!simple_input("Auth Realm:", realm, sizeof(realm))) 2432 break; 2433 if (!simple_input("Auth Username:", uname, sizeof(uname))) 2434 break; 2435 if (!simple_input("Auth Password:", passwd, sizeof(passwd))) 2436 break; 2437 2438 pjsua_acc_config_default(&acc_cfg); 2439 acc_cfg.id = pj_str(id); 2440 acc_cfg.reg_uri = pj_str(registrar); 2441 acc_cfg.cred_count = 1; 2442 acc_cfg.cred_info[0].scheme = pj_str("digest"); 2443 acc_cfg.cred_info[0].realm = pj_str(realm); 2444 acc_cfg.cred_info[0].username = pj_str(uname); 2445 acc_cfg.cred_info[0].data_type = 0; 2446 acc_cfg.cred_info[0].data = pj_str(passwd); 2447 2448 status = pjsua_acc_add(&acc_cfg, PJ_TRUE, NULL); 2449 if (status != PJ_SUCCESS) { 2450 pjsua_perror(THIS_FILE, "Error adding new account", status); 2451 } 2424 2452 2425 2453 } else { -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r1371 r1400 393 393 */ 394 394 395 /* Update default account */ 396 if (pjsua_var.default_acc == acc_id) 397 pjsua_var.default_acc = 0; 395 398 396 399 PJSUA_UNLOCK();
Note: See TracChangeset
for help on using the changeset viewer.