mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Properly initialize the cli_ping condition and lock
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121402 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -86,8 +86,9 @@ static struct ao2_container *tps_singletons;
|
|||||||
|
|
||||||
/*! \brief CLI 'taskprocessor ping <blah>' operation requires a ping condition */
|
/*! \brief CLI 'taskprocessor ping <blah>' operation requires a ping condition */
|
||||||
static ast_cond_t cli_ping_cond;
|
static ast_cond_t cli_ping_cond;
|
||||||
|
|
||||||
/*! \brief CLI 'taskprocessor ping <blah>' operation requires a ping condition lock */
|
/*! \brief CLI 'taskprocessor ping <blah>' operation requires a ping condition lock */
|
||||||
static ast_mutex_t cli_ping_cond_lock;
|
AST_MUTEX_DEFINE_STATIC(cli_ping_cond_lock);
|
||||||
|
|
||||||
/*! \brief The astobj2 hash callback for taskprocessors */
|
/*! \brief The astobj2 hash callback for taskprocessors */
|
||||||
static int tps_hash_cb(const void *obj, const int flags);
|
static int tps_hash_cb(const void *obj, const int flags);
|
||||||
@@ -124,6 +125,9 @@ int ast_tps_init(void)
|
|||||||
ast_log(LOG_ERROR, "taskprocessor container failed to initialize!\n");
|
ast_log(LOG_ERROR, "taskprocessor container failed to initialize!\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ast_cond_init(&cli_ping_cond, NULL);
|
||||||
|
|
||||||
ast_cli_register_multiple(taskprocessor_clis, ARRAY_LEN(taskprocessor_clis));
|
ast_cli_register_multiple(taskprocessor_clis, ARRAY_LEN(taskprocessor_clis));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user