[Freeswitch-svn] [commit] r4833 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Mon Apr 2 16:33:07 EDT 2007
Author: anthm
Date: Mon Apr 2 16:33:06 2007
New Revision: 4833
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c Mon Apr 2 16:33:06 2007
@@ -606,7 +606,8 @@
sofia_profile_t *profile;
char *tmp, *id = NULL;
nua_handle_t *nh;
-
+ int expire_sec = atoi(expires);
+
if (!(profile = sofia_glue_find_profile(sub_to_host))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find profile for host %s\n", host);
return 0;
@@ -616,7 +617,7 @@
assert(nh != NULL);
id = switch_mprintf("sip:%s@%s", sub_to_user, sub_to_host);
- exp = switch_mprintf("active;expires=%s", expires ? expires : "3600");
+ exp = switch_mprintf("active;expires=%ld", time(NULL) - expire_sec);
tmp = contact;
contact = sofia_glue_get_url_from_contact(tmp, 0);
More information about the Freeswitch-svn
mailing list