Skip to content

Commit

Permalink
ims_registrar_scscf: global vars declared extern in header files
Browse files Browse the repository at this point in the history
(cherry picked from commit a041e94)
  • Loading branch information
miconda authored and henningw committed May 13, 2020
1 parent 225536c commit ed81bd3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
10 changes: 8 additions & 2 deletions src/modules/ims_registrar_scscf/ims_registrar_scscf_mod.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
13 changes: 8 additions & 5 deletions src/modules/ims_registrar_scscf/registrar_notify.h
Expand Up @@ -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 */
Expand All @@ -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);

Expand Down
6 changes: 3 additions & 3 deletions src/modules/ims_registrar_scscf/stats.h
Expand Up @@ -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();
Expand Down

0 comments on commit ed81bd3

Please sign in to comment.