瀏覽代碼

htable: make ht_dmq_init_sync variable extern in ht_dmq.c

- avoiding redeclaration, it is set via modparam

(cherry picked from commit 02bff604ec70a51a5ba9faae38e946e556763e08)
Daniel-Constantin Mierla 5 年之前
父節點
當前提交
27de46c506
共有 3 個文件被更改,包括 2 次插入4 次删除
  1. 1 1
      src/modules/htable/ht_dmq.c
  2. 0 2
      src/modules/htable/ht_dmq.h
  3. 1 1
      src/modules/htable/htable.c

+ 1 - 1
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;

+ 0 - 2
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,

+ 1 - 1
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;
 	}