[sr-dev] git:5.1:194dd20c: uac: log an error if uac module should use the dialog module and it can't bind the API

Henning Westerholt hw at skalatan.de
Tue Apr 16 09:31:04 CEST 2019


Module: kamailio
Branch: 5.1
Commit: 194dd20c78a71c65d6692df4553792e9039e5dcd
URL: https://github.com/kamailio/kamailio/commit/194dd20c78a71c65d6692df4553792e9039e5dcd

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2019-04-16T09:30:32+02:00

uac: log an error if uac module should use the dialog module and it can't bind the API

(cherry picked from commit e2de33b01efdd2c9799a1d5cf9d0e7d127a36416)

---

Modified: src/modules/uac/uac.c

---

Diff:  https://github.com/kamailio/kamailio/commit/194dd20c78a71c65d6692df4553792e9039e5dcd.diff
Patch: https://github.com/kamailio/kamailio/commit/194dd20c78a71c65d6692df4553792e9039e5dcd.patch

---

diff --git a/src/modules/uac/uac.c b/src/modules/uac/uac.c
index 844b6025ff..05b7f2144d 100644
--- a/src/modules/uac/uac.c
+++ b/src/modules/uac/uac.c
@@ -286,14 +286,17 @@ static int mod_init(void)
 			/* we need the append_fromtag on in RR */
 
 			memset(&dlg_api, 0, sizeof(struct dlg_binds));
-			if (uac_restore_dlg==0 || load_dlg_api(&dlg_api)!=0) {
+			if (uac_restore_dlg==0) {
 				if (!uac_rrb.append_fromtag) {
 					LM_ERR("'append_fromtag' RR param is not enabled!"
 							" - required by AUTO restore mode\n");
 					goto error;
 				}
-				if (uac_restore_dlg!=0)
-					LM_DBG("failed to find dialog API - is dialog module loaded?\n");
+			} else {
+				if (load_dlg_api(&dlg_api)!=0) {
+					LM_ERR("failed to find dialog API - is dialog module loaded?\n");
+					goto error;
+				}
 			}
 
 			/* get all requests doing loose route */




More information about the sr-dev mailing list