Module: sip-router
Branch: master
Commit: ce8530af0700a1d9b9890c6b1aef816e018daade
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ce8530a…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Mar 6 18:05:49 2012 +0000
modules_k/rls: Bugfix in RLS. NOTIFYs from RLS for presence changes have wrong expires
value
- The expires parameter in the Subscription-State: header was a UNIX
time rather than an offset.
---
modules_k/rls/resource_notify.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/modules_k/rls/resource_notify.c b/modules_k/rls/resource_notify.c
index 382d8d9..df40e82 100644
--- a/modules_k/rls/resource_notify.c
+++ b/modules_k/rls/resource_notify.c
@@ -127,9 +127,9 @@ void get_dialog_from_did(char* did, subs_t **dialog, unsigned int
*hash_code)
*dialog= pres_copy_subs(s, PKG_MEM_TYPE);
}
- if(*dialog== NULL)
+ if(*dialog== NULL)
{
- LM_ERR("while copying subs_t structure\n");
+ LM_ERR("while copying subs_t structure\n");
}
else
{
@@ -138,7 +138,8 @@ void get_dialog_from_did(char* did, subs_t **dialog, unsigned int
*hash_code)
if (dbmode != RLS_DB_ONLY)
lock_release(&rls_table[*hash_code].lock);
-
+
+ (*dialog)->expires -= (int)time(NULL);
}
int send_notify(xmlDocPtr * rlmi_doc, char * buf, int buf_len,
@@ -880,7 +881,7 @@ void timer_send_notify(unsigned int ticks,void *param)
goto error;
}
- send_notifies(result, did_col, resource_uri_col, auth_state_col, reason_col,
+ send_notifies(result, did_col, resource_uri_col, auth_state_col, reason_col,
pres_state_col, content_type_col);
error:
done: