[sr-dev] git:master: modules_k/uac: fix handling of empty display-part.

Andreas Granig agranig at linguin.org
Wed Jul 11 13:00:15 CEST 2012


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

Author: Andreas Granig <agranig at sipwise.com>
Committer: Andreas Granig <agranig at sipwise.com>
Date:   Wed Jul 11 12:52:38 2012 +0200

modules_k/uac: fix handling of empty display-part.

This re-enables the feature to strip the display name by setting
an empty string, like uac_replace_from("", "$var(from)");

---

 modules_k/uac/uac.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/modules_k/uac/uac.c b/modules_k/uac/uac.c
index 8de09b1..763dd5a 100644
--- a/modules_k/uac/uac.c
+++ b/modules_k/uac/uac.c
@@ -435,14 +435,11 @@ static int fixup_replace_disp_uri(void** param, int param_no)
 			s.len += 2;
 		}
 	}
-	if(s.len!=0)
+	if(pv_parse_format(&s ,&model)<0)
 	{
-		if(pv_parse_format(&s ,&model)<0)
-		{
-			LM_ERR("wrong format [%s] for param no %d!\n", s.s, param_no);
-			pkg_free(s.s);
-			return E_UNSPEC;
-		}
+		LM_ERR("wrong format [%s] for param no %d!\n", s.s, param_no);
+		pkg_free(s.s);
+		return E_UNSPEC;
 	}
 	*param = (void*)model;
 




More information about the sr-dev mailing list