modules_k/uac: fix handling of empty display-part.
authorAndreas Granig <agranig@sipwise.com>
Wed, 11 Jul 2012 10:52:38 +0000 (12:52 +0200)
committerAndreas Granig <agranig@sipwise.com>
Wed, 11 Jul 2012 10:56:29 +0000 (12:56 +0200)
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

index 8de09b1..763dd5a 100644 (file)
@@ -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;