[Freeswitch-svn] [commit] r9517 - freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua
Freeswitch SVN
mikej at freeswitch.org
Wed Sep 10 12:23:59 EDT 2008
Author: mikej
Date: Wed Sep 10 12:23:59 2008
New Revision: 9517
Modified:
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c
Log:
Wed Sep 10 11:46:36 EDT 2008 Pekka Pessi <first.last at nokia.com>
* test_s2.c: add From tag to s2-generated requests
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/nua/test_s2.c Wed Sep 10 12:23:59 2008
@@ -629,6 +629,20 @@
if (sip->sip_payload)
l->l_length = sip->sip_payload->pl_len;
+ if (d->local->a_tag == NULL) {
+ char const *ltag = s2_generate_tag(d->home);
+
+ if (sip_from_tag(d->home, d->local, ltag) < 0) {
+ assert(!"add To tag");
+ }
+
+ if (sip->sip_from && sip->sip_from->a_tag == NULL) {
+ if (sip_from_tag(msg_home(msg), sip->sip_from, ltag) < 0) {
+ assert(!"add To tag");
+ }
+ }
+ }
+
sip_add_tl(msg, sip,
TAG_IF(!sip->sip_from, SIPTAG_FROM(d->local)),
TAG_IF(!sip->sip_contact, SIPTAG_CONTACT(d->contact)),
More information about the Freeswitch-svn
mailing list