Skip to content

Commit 2144d9d

Browse files
committed
[mod_mosquitto] Update .gitignore and minor refactor of mod_mosquitto.c
1 parent 8e712eb commit 2144d9d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,5 @@ ltmain.sh
5959
missing
6060
test-driver
6161
core.*
62-
TAGS
62+
TAGS
63+
.vscode/c_cpp_properties.json

mod_mosquitto.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_mosquitto_load) {
7171
memset(&mosquitto_globals, 0, sizeof(mosquitto_globals));
7272
mosquitto_globals.pool = pool;
7373

74+
switch_thread_rwlock_create(&mosquitto_globals.bgapi_rwlock, mosquitto_globals.pool);
7475
switch_mutex_init(&mosquitto_globals.mutex, SWITCH_MUTEX_DEFAULT, mosquitto_globals.pool);
7576
switch_mutex_init(&mosquitto_globals.log.mutex, SWITCH_MUTEX_DEFAULT, mosquitto_globals.pool);
7677
switch_mutex_init(&mosquitto_globals.profiles_mutex, SWITCH_MUTEX_NESTED, mosquitto_globals.pool);
77-
switch_thread_rwlock_create(&mosquitto_globals.bgapi_rwlock, mosquitto_globals.pool);
78-
switch_core_hash_init(&mosquitto_globals.profiles);
7978
switch_queue_create(&mosquitto_globals.event_queue, mosquitto_globals.event_queue_size, mosquitto_globals.pool);
8079

80+
switch_core_hash_init(&mosquitto_globals.profiles);
81+
8182
/* create a loadable module interface structure named with modname */
8283
/* the module interface defines the different interfaces that this module has defined */
8384
*module_interface = switch_loadable_module_create_module_interface(pool, modname);

0 commit comments

Comments
 (0)