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

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


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

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