Changeset 160 for pjproject/trunk/pjsip/src/pjsip/sip_ua_layer.c
- Timestamp:
- Feb 8, 2006 10:44:25 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_ua_layer.c
r145 r160 475 475 pjsip_dialog *dlg; 476 476 477 /* Optimized path: bail out early if request doesn't have To tag */ 478 if (rdata->msg_info.to->tag.slen == 0) 477 /* Optimized path: bail out early if request is not CANCEL and it doesn't 478 * have To tag 479 */ 480 if (rdata->msg_info.to->tag.slen == 0 && 481 rdata->msg_info.msg->line.req.method.id != PJSIP_CANCEL_METHOD) 482 { 479 483 return PJ_FALSE; 484 } 480 485 481 486 /* Lock user agent before looking up the dialog hash table. */ … … 625 630 626 631 if (rdata->msg_info.cseq->method.id == PJSIP_INVITE_METHOD) { 627 //pj_str_t *to_tag = &rdata->msg_info.to->tag; 632 633 int st_code = rdata->msg_info.msg->line.status.code; 634 pj_str_t *to_tag = &rdata->msg_info.to->tag; 628 635 629 636 /* Must hold UA mutex before accessing dialog set. */ … … 632 639 dlg = dlg_set->dlg_list.next; 633 640 634 /* Forking handling is temporarily disabled. */635 PJ_TODO(UA_LAYER_HANDLE_FORKING);636 637 #if 0638 641 while (dlg != (pjsip_dialog*)&dlg_set->dlg_list) { 639 642 … … 653 656 654 657 /* If no dialog with matching remote tag is found, this must be 655 * a forked response. 658 * a forked response. Respond to this ONLY when response is non-100 659 * provisional response OR a 2xx response. 656 660 */ 657 if (dlg == (pjsip_dialog*)&dlg_set->dlg_list) { 661 if (dlg == (pjsip_dialog*)&dlg_set->dlg_list && 662 ((st_code/100==1 && st_code!=100) || st_code/100==2)) 663 { 658 664 /* Report to application about forked condition. 659 665 * Application can either create a dialog or ignore the response. … … 678 684 return PJ_TRUE; 679 685 } 686 687 } else if (dlg == (pjsip_dialog*)&dlg_set->dlg_list) { 688 689 /* For 100 or non-2xx response which has different To tag, 690 * pass the response to the first dialog. 691 */ 692 693 dlg = dlg_set->dlg_list.next; 694 680 695 } 681 #endif682 696 683 697 /* Done with the dialog set. */
Note: See TracChangeset
for help on using the changeset viewer.