Module: kamailio
Branch: 5.3
Commit: d7c52a7c59c27c054a3782b7f004b865006b6d4d
URL:
https://github.com/kamailio/kamailio/commit/d7c52a7c59c27c054a3782b7f004b86…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-03-09T09:17:55+01:00
ims_registrar_scscf: global vars declared extern in header files
(cherry picked from commit a041e94c4dce464737d6531d11fbe4d61292d7b4)
---
Modified: src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c
Modified: src/modules/ims_registrar_scscf/registrar_notify.h
Modified: src/modules/ims_registrar_scscf/stats.h
---
Diff:
https://github.com/kamailio/kamailio/commit/d7c52a7c59c27c054a3782b7f004b86…
Patch:
https://github.com/kamailio/kamailio/commit/d7c52a7c59c27c054a3782b7f004b86…
---
diff --git a/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c
b/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c
index b7a408b023..c402ac3985 100644
--- a/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c
+++ b/src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c
@@ -79,8 +79,11 @@ MODULE_VERSION
extern gen_lock_t* process_lock; /* lock on the process table */
-int * callback_singleton; /**< Cx callback singleton */
+int *callback_singleton; /**< Cx callback singleton */
+stat_var* stat_sar_timeouts;
+stat_var* sar_replies_received;
+stat_var* sar_replies_response_time;
struct tm_binds tmb;
@@ -176,7 +179,10 @@ int max_notification_list_size = 0;
int notification_processes = 4; /*Number of processes that processes the notification
queue*/
-extern reg_notification_list *notification_list; /**< list of notifications for reg to
be sent */
+reg_notification_list *notification_list; /**< list of notifications for reg to be
sent */
+
+IMS_Events_enum_t IMS_Events;
+IMS_Registrar_events_enum_t IMS_Registrar_events;
#define RCV_NAME "received"
str rcv_param = str_init(RCV_NAME);
diff --git a/src/modules/ims_registrar_scscf/registrar_notify.h
b/src/modules/ims_registrar_scscf/registrar_notify.h
index ee1fec52e8..5491c43b5d 100644
--- a/src/modules/ims_registrar_scscf/registrar_notify.h
+++ b/src/modules/ims_registrar_scscf/registrar_notify.h
@@ -96,13 +96,15 @@ typedef struct {
} reg_notification_list;
/** Events for subscriptions */
-enum {
+typedef enum {
IMS_EVENT_NONE, /**< Generic, no event */
IMS_EVENT_REG /**< Registration event */
-} IMS_Events;
+} IMS_Events_enum_t;
+
+extern IMS_Events_enum_t IMS_Events;
/** Event types for "reg" to generated notifications after */
-enum {
+typedef enum {
IMS_REGISTRAR_NONE, /**< no event - donothing */
IMS_REGISTRAR_SUBSCRIBE, /**< Initial SUBSCRIBE - just send all data - this should
not be treated though */
IMS_REGISTRAR_UNSUBSCRIBE, /**< Final UnSUBSCRIBE - just send a NOTIFY which will
probably fail */
@@ -114,10 +116,11 @@ enum {
IMS_REGISTRAR_CONTACT_EXPIRED, /**< A contact has expired and will be removed */
IMS_REGISTRAR_CONTACT_UNREGISTERED, /**< User unregistered with Expires 0 */
IMS_REGISTRAR_CONTACT_UNREGISTERED_IMPLICIT, /**< User unregistered implicitly, ie
not via explicit deregister */
-} IMS_Registrar_events;
+} IMS_Registrar_events_enum_t;
+extern IMS_Registrar_events_enum_t IMS_Registrar_events;
-reg_notification_list *notification_list; //< List of pending notifications
+extern reg_notification_list *notification_list; //< List of pending notifications
int can_subscribe_to_reg(struct sip_msg *msg, char *str1, char *str2);
diff --git a/src/modules/ims_registrar_scscf/stats.h
b/src/modules/ims_registrar_scscf/stats.h
index 3b2c61b964..ea4418f426 100644
--- a/src/modules/ims_registrar_scscf/stats.h
+++ b/src/modules/ims_registrar_scscf/stats.h
@@ -43,9 +43,9 @@
#include "../../core/counters.h"
-stat_var* stat_sar_timeouts;
-stat_var* sar_replies_received;
-stat_var* sar_replies_response_time;
+extern stat_var* stat_sar_timeouts;
+extern stat_var* sar_replies_received;
+extern stat_var* sar_replies_response_time;
int register_stats();
unsigned long get_avg_sar_response_time();