Module: sip-router
Branch: carstenbock/ims
Commit: e00b3e3d43ba2e822aa5ed358b19a3b290d3ed39
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e00b3e3d43ba2e822aa5ed358b19a3b290d3ed39

Author: Carsten Bock <[email protected]>
Committer: Carsten Bock <[email protected]>
Date:   Wed Apr  6 11:16:55 2011 +0200

- should use "callid"-attribute instead of "id"-attribute in XML.

---

 modules_k/pua_reginfo/notify.c    |    2 +-
 modules_k/pua_reginfo/usrloc_cb.c |    9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/modules_k/pua_reginfo/notify.c b/modules_k/pua_reginfo/notify.c
index 7d076e5..e753053 100644
--- a/modules_k/pua_reginfo/notify.c
+++ b/modules_k/pua_reginfo/notify.c
@@ -173,7 +173,7 @@ int process_body(str notify_body, udomain_t * domain) {
                while (contacts) {
                        if (xmlStrcasecmp(contacts->name, BAD_CAST "contact") 
!= 0)
                                goto next_contact;
-                       callid.s = xmlGetAttrContentByName(contacts, "id");
+                       callid.s = xmlGetAttrContentByName(contacts, "callid");
                        if (callid.s == NULL) {
                                LM_ERR("No Call-ID for this contact!\n");       
        
                                goto next_contact;
diff --git a/modules_k/pua_reginfo/usrloc_cb.c 
b/modules_k/pua_reginfo/usrloc_cb.c
index 2fa47f6..6fb807c 100644
--- a/modules_k/pua_reginfo/usrloc_cb.c
+++ b/modules_k/pua_reginfo/usrloc_cb.c
@@ -114,7 +114,7 @@ str* build_reginfo_full(urecord_t * record, str uri, 
ucontact_t* c, int type) {
                                goto error;
                        }
                        memset(buf, 0, sizeof(buf));
-                       buf_len = snprintf(buf, sizeof(buf), "%.*s", 
ptr->callid.len, ptr->callid.s);
+                       buf_len = snprintf(buf, sizeof(buf), "%p", ptr);
                        xmlNewProp(contact_node, BAD_CAST "id", BAD_CAST 
ptr->callid.s);
                        /* Check, if this is the modified contact: */
                        if (ptr == c) {
@@ -140,7 +140,12 @@ str* build_reginfo_full(urecord_t * record, str uri, 
ucontact_t* c, int type) {
                                buf_len = snprintf(buf, sizeof(buf), "%.3f", q);
                                xmlNewProp(contact_node, BAD_CAST "q", BAD_CAST 
buf);
                        }
-
+                       /* CallID Attribute */
+                       buf_len = snprintf(buf, sizeof(buf), "%.*s", 
ptr->callid.len, ptr->callid.s);
+                       xmlNewProp(contact_node, BAD_CAST "callid", BAD_CAST 
ptr->callid.s);
+                       /* CSeq Attribute */
+                       buf_len = snprintf(buf, sizeof(buf), "%d", ptr->cseq);
+                       uri_node = xmlNewChild(contact_node, NULL, BAD_CAST 
"cseq", BAD_CAST buf) ;
                        /* URI-Node */
                        buf_len = snprintf(buf, sizeof(buf), "%.*s", 
ptr->c.len, ptr->c.s);
                        uri_node = xmlNewChild(contact_node, NULL, BAD_CAST 
"uri", BAD_CAST buf) ;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to