Macro expands to: switch_status_t mod_directory_shutdown() */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_directory_shutdown)
{
- switch_hash_index_t *hi;
+ switch_hash_index_t *hi = NULL;
dir_profile_t *profile;
void *val = NULL;
const void *key;
switch_mutex_lock(globals.mutex);
- while ((hi = switch_core_hash_first(globals.profile_hash))) {
+ while ((hi = switch_core_hash_first_iter(globals.profile_hash, hi))) {
switch_core_hash_this(hi, &key, &keylen, &val);
profile = (dir_profile_t *) val;
switch_channel_t *channel = switch_core_session_get_channel(session);
limit_redis_private_t *pvt = switch_channel_get_private(channel, "limit_redis");
int val, uuid_val;
- switch_hash_index_t *hi;
char *rediskey = NULL;
char *uuid_rediskey = NULL;
int status = SWITCH_STATUS_SUCCESS;
/* clear for uuid */
if (realm == NULL && resource == NULL) {
+ switch_hash_index_t *hi = NULL;
/* Loop through the channel's hashtable which contains mapping to all the limit_redis_item_t referenced by that channel */
- while ((hi = switch_core_hash_first(pvt->hash))) {
+ while ((hi = switch_core_hash_first_iter(pvt->hash, hi))) {
void *p_val = NULL;
const void *p_key;
char *p_uuid_key = NULL;
switch_status_t rtmp_profile_destroy(rtmp_profile_t **profile) {
int sanity = 0;
- switch_hash_index_t *hi;
+ switch_hash_index_t *hi = NULL;
switch_xml_config_item_t *instructions = get_instructions(*profile);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Stopping profile: %s\n", (*profile)->name);
switch_thread_rwlock_wrlock((*profile)->rwlock);
/* Kill all sessions */
- while ((hi = switch_core_hash_first((*profile)->session_hash))) {
+ while ((hi = switch_core_hash_first_iter((*profile)->session_hash, hi))) {
void *val;
rtmp_session_t *session;
const void *key;
*/
static void rayo_peer_server_cleanup(struct rayo_actor *actor)
{
- switch_hash_index_t *hi;
+ switch_hash_index_t *hi = NULL;
struct rayo_peer_server *rserver = RAYO_PEER_SERVER(actor);
/* a little messy... client will remove itself from the peer server when it is destroyed,
* the server must remove the client.
*/
switch_mutex_lock(globals.clients_mutex);
- while ((hi = switch_core_hash_first(rserver->clients))) {
+ while ((hi = switch_core_hash_first_iter(rserver->clients, hi))) {
const void *key;
void *client;
switch_core_hash_this(hi, &key, NULL, &client);