[sr-dev] git:5.2:27de46c5: htable: make ht_dmq_init_sync variable extern in ht_dmq.c

Henning Westerholt hw at skalatan.de
Wed Jan 22 23:12:31 CET 2020


Module: kamailio
Branch: 5.2
Commit: 27de46c506dc7cc9bdc6ce8f249176f6df0221f4
URL: https://github.com/kamailio/kamailio/commit/27de46c506dc7cc9bdc6ce8f249176f6df0221f4

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2020-01-22T23:05:01+01:00

htable: make ht_dmq_init_sync variable extern in ht_dmq.c

- avoiding redeclaration, it is set via modparam

(cherry picked from commit 02bff604ec70a51a5ba9faae38e946e556763e08)

---

Modified: src/modules/htable/ht_dmq.c
Modified: src/modules/htable/ht_dmq.h
Modified: src/modules/htable/htable.c

---

Diff:  https://github.com/kamailio/kamailio/commit/27de46c506dc7cc9bdc6ce8f249176f6df0221f4.diff
Patch: https://github.com/kamailio/kamailio/commit/27de46c506dc7cc9bdc6ce8f249176f6df0221f4.patch

---

diff --git a/src/modules/htable/ht_dmq.c b/src/modules/htable/ht_dmq.c
index 26c6eb859a..ccb67e30d8 100644
--- a/src/modules/htable/ht_dmq.c
+++ b/src/modules/htable/ht_dmq.c
@@ -48,7 +48,7 @@ static str dmq_500_rpl  = str_init("Server Internal Error");
 static int dmq_cell_group_empty_size = 12; // {"cells":[]}
 static int dmq_cell_group_max_size = 60000;
 static ht_dmq_jdoc_cell_group_t ht_dmq_jdoc_cell_group;
-int ht_dmq_init_sync;
+extern int ht_dmq_init_sync;
 
 dmq_api_t ht_dmqb;
 dmq_peer_t* ht_dmq_peer = NULL;
diff --git a/src/modules/htable/ht_dmq.h b/src/modules/htable/ht_dmq.h
index be11d4dc49..014dffbc6a 100644
--- a/src/modules/htable/ht_dmq.h
+++ b/src/modules/htable/ht_dmq.h
@@ -31,8 +31,6 @@ extern dmq_api_t ht_dmqb;
 extern dmq_peer_t* ht_dmq_peer;
 extern dmq_resp_cback_t ht_dmq_resp_callback;
 
-int ht_dmq_init_sync;
-
 typedef enum {
 		HT_DMQ_NONE,
         HT_DMQ_SET_CELL,
diff --git a/src/modules/htable/htable.c b/src/modules/htable/htable.c
index e48d1d4415..1bc3c67aec 100644
--- a/src/modules/htable/htable.c
+++ b/src/modules/htable/htable.c
@@ -220,7 +220,7 @@ static int mod_init(void)
 		}
 	}
 
-	if (ht_enable_dmq>0 && ht_dmq_initialize(ht_dmq_init_sync)!=0) {
+	if (ht_enable_dmq>0 && ht_dmq_initialize()!=0) {
 		LM_ERR("failed to initialize dmq integration\n");
 		return -1;
 	}




More information about the sr-dev mailing list