Просмотр исходного кода

ims_registrar_pcscf: Bugfix: Properly handle the case, when we do not have a Asserted Identity

Carsten Bock 11 лет назад
Родитель
Сommit
6b0bcff43c
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      modules/ims_registrar_pcscf/reg_mod.c

+ 4 - 3
modules/ims_registrar_pcscf/reg_mod.c

@@ -394,12 +394,13 @@ static int w_assert_identity(struct sip_msg* _m, char* _d, char* _preferred_uri)
 }
 }
 
 
 /*
 /*
- * Returns the current RTP-Statistics from the RTP-Proxy
+ * Get the asserted Identity for the current user
  */
  */
 static int
 static int
 pv_get_asserted_identity_f(struct sip_msg *msg, pv_param_t *param,
 pv_get_asserted_identity_f(struct sip_msg *msg, pv_param_t *param,
 		  pv_value_t *res)
 		  pv_value_t *res)
 {
 {
-    str * ret_val = get_asserted_identity(msg);
-    return pv_get_strval(msg, param, res, ret_val);
+	str * ret_val = get_asserted_identity(msg);
+	if (ret_val != NULL) return pv_get_strval(msg, param, res, ret_val);
+	else return -1;
 }
 }