Changeset 127 for pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c
- Timestamp:
- Jan 30, 2006 6:40:05 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_auth_client.c
r123 r127 349 349 sess->cred_info = NULL; 350 350 pj_list_init(&sess->cached_auth); 351 352 return PJ_SUCCESS; 353 } 354 355 356 /* Clone session. */ 357 PJ_DEF(pj_status_t) pjsip_auth_clt_clone( pj_pool_t *pool, 358 pjsip_auth_clt_sess *sess, 359 const pjsip_auth_clt_sess *rhs ) 360 { 361 unsigned i; 362 363 PJ_ASSERT_RETURN(pool && sess && rhs, PJ_EINVAL); 364 365 sess->pool = pool; 366 sess->endpt = (pjsip_endpoint*)rhs->endpt; 367 sess->cred_cnt = rhs->cred_cnt; 368 sess->cred_info = pj_pool_alloc(pool, 369 sess->cred_cnt*sizeof(pjsip_cred_info)); 370 for (i=0; i<rhs->cred_cnt; ++i) { 371 pj_strdup(pool, &sess->cred_info[i].realm, &rhs->cred_info[i].realm); 372 pj_strdup(pool, &sess->cred_info[i].scheme, &rhs->cred_info[i].scheme); 373 pj_strdup(pool, &sess->cred_info[i].username, 374 &rhs->cred_info[i].username); 375 sess->cred_info[i].data_type = rhs->cred_info[i].data_type; 376 pj_strdup(pool, &sess->cred_info[i].data, &rhs->cred_info[i].data); 377 } 378 379 /* TODO note: 380 * Cloning the full authentication client is quite a big task. 381 * We do only the necessary bits here, i.e. cloning the credentials. 382 * The drawback of this basic approach is, a forked dialog will have to 383 * re-authenticate itself on the next request because it has lost the 384 * cached authentication headers. 385 */ 386 PJ_TODO(FULL_CLONE_OF_AUTH_CLIENT_SESSION); 351 387 352 388 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.