MODAPP-412 - improve rate limit support

add switch_core_hash_delete_multi


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17085 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Rupa Schomaker
2010-03-24 16:11:24 +00:00
parent 5970ca045b
commit 256274ac33
4 changed files with 104 additions and 9 deletions
+8
View File
@@ -1201,6 +1201,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(_In_ switch_hash_t *hash
*/
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete_locked(_In_ switch_hash_t *hash, _In_z_ const char *key, _In_ switch_mutex_t *mutex);
/*!
\brief Delete data from a hash based on callback function
\param hash the hash to delete from
\param callback the function to call which returns SWITCH_TRUE to delete, SWITCH_FALSE to preserve
\return SWITCH_STATUS_SUCCESS if any data is deleted
*/
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete_multi(_In_ switch_hash_t *hash, _In_ switch_hash_delete_callback_t callback, _In_opt_ void *pData);
/*!
\brief Retrieve data from a given hash
\param hash the hash to retrieve from
+2
View File
@@ -1560,6 +1560,8 @@ typedef void (*switch_event_callback_t) (switch_event_t *);
typedef switch_caller_extension_t *(*switch_dialplan_hunt_function_t) (switch_core_session_t *, void *, switch_caller_profile_t *);
#define SWITCH_STANDARD_DIALPLAN(name) static switch_caller_extension_t *name (switch_core_session_t *session, void *arg, switch_caller_profile_t *caller_profile)
typedef switch_bool_t (*switch_hash_delete_callback_t) (_In_ const void *key, _In_ const void *val, _In_opt_ void *pData);
#define SWITCH_HASH_DELETE_FUNC(name) static switch_bool_t name (const void *key, const void *val, void *pData)
typedef struct switch_scheduler_task switch_scheduler_task_t;