[sr-dev] git:master: modules_k/rls: Some cleanup of whitespace and diagnostics

Peter Dunkley peter.dunkley at crocodile-rcs.com
Fri Feb 24 00:10:46 CET 2012


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

Author: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Date:   Thu Feb 23 23:04:39 2012 +0000

modules_k/rls: Some cleanup of whitespace and diagnostics

---

 modules_k/rls/rls.c       |    2 +-
 modules_k/rls/subscribe.c |   12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/modules_k/rls/rls.c b/modules_k/rls/rls.c
index 7b827cb..1d64e26 100644
--- a/modules_k/rls/rls.c
+++ b/modules_k/rls/rls.c
@@ -578,7 +578,7 @@ static int mod_init(void)
 	
 	if(pua.get_record_id == NULL)
 	{
-		LM_ERR("Could not import send_subscribe\n");
+		LM_ERR("Could not import get_record_id\n");
 		return -1;
 	}
 	pua_get_record_id= pua.get_record_id;
diff --git a/modules_k/rls/subscribe.c b/modules_k/rls/subscribe.c
index 42da091..eee4941 100644
--- a/modules_k/rls/subscribe.c
+++ b/modules_k/rls/subscribe.c
@@ -857,8 +857,10 @@ int send_resource_subs(char* uri, void* param)
 	if (check_self(&parsed_pres_uri.host, 0, PROTO_NONE) != 1
 		&& rls_disable_remote_presence != 0)
 	{
-		LM_WARN("Unable to subscribe to remote contact %.*s\n",
-				pres_uri.len, pres_uri.s);
+		LM_WARN("Unable to subscribe to remote contact %.*s for watcher %.*s\n",
+				pres_uri.len, pres_uri.s,
+				((subs_info_t*)param)->watcher_uri->len,
+				((subs_info_t*)param)->watcher_uri->s);
 		return 1;
 	}
 
@@ -872,7 +874,6 @@ int send_resource_subs(char* uri, void* param)
  */
 int resource_subscriptions(subs_t* subs, xmlNodePtr xmlnode)
 {
-	char* uri= NULL;
 	subs_info_t s;
 	str wuri= {0, 0};
 	str extra_headers;
@@ -932,8 +933,6 @@ int resource_subscriptions(subs_t* subs, xmlNodePtr xmlnode)
 error:
 	if(wuri.s)
 		pkg_free(wuri.s);
-	if(uri)
-		xmlFree(uri);
 	if(did_str.s)
 		pkg_free(did_str.s);
 	return -1;
@@ -993,7 +992,6 @@ done:
 	pkg_free(subs_copy);
 }
 
-
 int rls_update_subs(struct sip_msg *msg, char *puri, char *pevent)
 {
 	str uri;
@@ -1072,7 +1070,7 @@ int rls_update_subs(struct sip_msg *msg, char *puri, char *pevent)
 		{
 			if (subs->from_user.len == parsed_uri.user.len &&
 				strncmp(subs->from_user.s, parsed_uri.user.s, parsed_uri.user.len) == 0 &&
-			    subs->from_domain.len == parsed_uri.host.len &&
+				subs->from_domain.len == parsed_uri.host.len &&
 				strncmp(subs->from_domain.s, parsed_uri.host.s, parsed_uri.host.len) == 0 &&
 				subs->event->evp->type == e.type)
 			{




More information about the sr-dev mailing list