[sr-dev] git:master:e85c6bf7: nats: moved static global in the c file

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 8 08:23:40 CET 2022


Module: kamailio
Branch: master
Commit: e85c6bf7636b15170ddd7d0c51ae462e51c2c974
URL: https://github.com/kamailio/kamailio/commit/e85c6bf7636b15170ddd7d0c51ae462e51c2c974

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-02-08T08:23:01+01:00

nats: moved static global in the c file

- it is used only in that file

---

Modified: src/modules/nats/defs.h
Modified: src/modules/nats/nats_mod.c

---

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

---

diff --git a/src/modules/nats/defs.h b/src/modules/nats/defs.h
index 5f7dfafe0b..0ec06451e5 100644
--- a/src/modules/nats/defs.h
+++ b/src/modules/nats/defs.h
@@ -46,7 +46,6 @@ typedef struct _nats_evroutes
 	int connected;
 	int disconnected;
 } nats_evroutes_t;
-static nats_evroutes_t _nats_rts;
 
 typedef struct _init_nats_sub
 {
diff --git a/src/modules/nats/nats_mod.c b/src/modules/nats/nats_mod.c
index 05f71ea443..2a53beda82 100644
--- a/src/modules/nats/nats_mod.c
+++ b/src/modules/nats/nats_mod.c
@@ -39,6 +39,8 @@ char *eventData = NULL;
 int *nats_pub_worker_pipes_fds = NULL;
 int *nats_pub_worker_pipes = NULL;
 
+static nats_evroutes_t _nats_rts;
+
 static pv_export_t nats_mod_pvs[] = {
 		{{"natsData", (sizeof("natsData") - 1)}, PVT_OTHER,
 				nats_pv_get_event_payload, 0, 0, 0, 0, 0},




More information about the sr-dev mailing list