2. add lock for hiredis_profile for destroy vs running commands
3. Look into refactor/cleanup of xml processing
4. Add tab complete for profile names for APIs, and possibly for supported actions(and in theory look into key listing from redis)
+5. Add linked list session pvt structure for keeping track of limit incr's on a session by session basis
data++;
}
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hiredis: debug: profile[%s] for command [%s]\n", input, data);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "hiredis: debug: profile[%s] for command [%s]\n", input, data);
profile = switch_core_hash_find(mod_hiredis_globals.profiles, input);
time_t now = switch_epoch_time_now(NULL);
switch_status_t status = SWITCH_STATUS_SUCCESS;
- if ( !zstr(realm) ) {
+ if ( zstr(realm) ) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hiredis: realm must be defined\n");
switch_goto_status(SWITCH_STATUS_GENERR, done);
}
switch_goto_status(SWITCH_STATUS_GENERR, done);
}
+ if ( !realm && !resource ) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hiredis does not yet support release on NULL realm[%s] and resource[%s]\n", realm, resource);
+ switch_goto_status(SWITCH_STATUS_GENERR, done);
+ }
+
hashkey = switch_mprintf("decr %s", resource);
if ( hiredis_profile_execute_sync(profile, hashkey, &response) != SWITCH_STATUS_SUCCESS) {