]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add date header to 200OK on register
authorBrian West <brian@freeswitch.org>
Wed, 31 Dec 2008 16:23:24 +0000 (16:23 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 31 Dec 2008 16:23:24 +0000 (16:23 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11022 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index aba046a5ab470bb6c1fe442dfc90945ba2b8e12c..ff24dd922b5880eea43ee5d9203658904aac300b 100644 (file)
@@ -1064,6 +1064,8 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
 
        if (regtype == REG_REGISTER) {
                char exp_param[128] = "";
+               char date[80] = "";
+
                s_event = NULL;
 
                if (exptime) {
@@ -1086,7 +1088,12 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand
                        }
                }
                
-               nua_respond(nh, SIP_200_OK, SIPTAG_CONTACT(sip->sip_contact), TAG_IF(path_val, SIPTAG_PATH_STR(path_val)), NUTAG_WITH_THIS(nua), TAG_END());
+               switch_rfc822_date(date, switch_timestamp_now());
+               nua_respond(nh, SIP_200_OK, SIPTAG_CONTACT(sip->sip_contact),
+                                       TAG_IF(path_val, SIPTAG_PATH_STR(path_val)),
+                                       NUTAG_WITH_THIS(nua),
+                                       SIPTAG_DATE_STR(date),
+                                       TAG_END());
 
                if (s_event) {
                        switch_event_fire(&s_event);