parse_gsm_spans(cfg, spans);
}
- switch_core_hash_init(&globals.ss7_configs, module_pool);
+ switch_core_hash_init(&globals.ss7_configs);
if ((spans = switch_xml_child(cfg, "sangoma_ss7_spans"))) {
for (myspan = switch_xml_child(spans, "span"); myspan; myspan = myspan->next) {
ftdm_status_t zstatus = FTDM_FAIL;
void *val;
/* destroy ss7 configs */
- for (hi = switch_hash_first(NULL, globals.ss7_configs); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( globals.ss7_configs); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
ftdm_conf_node_destroy(val);
}
- MIMETypeAdd("text/html", "html");
+
for (hi = switch_core_mime_index(); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
if (var && val) {
@@ -955,38 +1042,52 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_xml_rpc_runtime)
switch_snprintf(logfile, sizeof(logfile), "%s%s%s", SWITCH_GLOBAL_dirs.log_dir, SWITCH_PATH_SEPARATOR, "freeswitch_http.log");
* progress at the same time.
*/
-SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p, switch_hash_t *ht);
+SWITCH_DECLARE(switch_hash_index_t *) switch_core_hash_first(switch_memory_pool_t *p, switch_hash_t *ht);
/**
* Continue iterating over the entries in a hash table.
* @return a pointer to the updated iteration state. NULL if there are no more
* entries.
*/
-SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(switch_hash_index_t *ht);
+SWITCH_DECLARE(switch_hash_index_t *) switch_core_hash_next(switch_hash_index_t *ht);
/**
* Get the current entry's details from the iteration state.
* @remark The return pointers should point to a variable that will be set to the
* corresponding data, or they may be NULL if the data isn't interesting.
*/
-SWITCH_DECLARE(void) switch_hash_this(switch_hash_index_t *hi, const void **key, switch_ssize_t *klen, void **val);
+SWITCH_DECLARE(void) switch_core_hash_this(switch_hash_index_t *hi, const void **key, switch_ssize_t *klen, void **val);
\param pool the pool to use for the new hash
\return SWITCH_STATUS_SUCCESS if the hash is created
*/
-SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(_Out_ switch_hash_t **hash, _In_ switch_memory_pool_t *pool, switch_bool_t case_sensitive);
-#define switch_core_hash_init(_hash, _pool) switch_core_hash_init_case(_hash, _pool, SWITCH_TRUE)
-#define switch_core_hash_init_nocase(_hash, _pool) switch_core_hash_init_case(_hash, _pool, SWITCH_FALSE)
+SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(_Out_ switch_hash_t **hash, switch_bool_t case_sensitive);
+#define switch_core_hash_init(_hash) switch_core_hash_init_case(_hash, SWITCH_TRUE)
+#define switch_core_hash_init_nocase(_hash) switch_core_hash_init_case(_hash, SWITCH_FALSE)
SWITCH_DECLARE(void) switch_core_hash_this(_In_ switch_hash_index_t *hi, _Out_opt_ptrdiff_cap_(klen)
const void **key, _Out_opt_ switch_ssize_t *klen, _Out_ void **val);
-/*!
- \brief DEPRECATED in favor of switch_core_hash_first(). Gets the first element of a hashtable.
- \param deprecate_me [deprecated] NULL
- \param hash the hashtable to use
- \return The element, or NULL if it wasn't found
-*/
-SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(char *deprecate_me, _In_ switch_hash_t *hash);
-/*!
- \brief DEPRECATED in favor of switch_core_hash_next(). Gets the next element of a hashtable.
- \param hi The current element
- \return The next element, or NULL if there are no more
-*/
-SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(_In_ switch_hash_index_t *hi);
-
-/*!
- \brief DEPRECATED in favor of switch_core_hash_this(). Gets the key and value of the current hash element.
- \param hi The current element
- \param key [out] the key
- \param klen [out] the key's size
- \param val [out] the value
-*/
-SWITCH_DECLARE(void) switch_hash_this(_In_ switch_hash_index_t *hi, _Out_opt_ptrdiff_cap_(klen)
- const void **key, _Out_opt_ switch_ssize_t *klen, _Out_ void **val);
///\}
const char *tag_name, const char *key_name, const char *key_value, switch_event_t *params,
void *user_data);
-typedef struct switch_hash switch_hash_t;
-struct HashElem;
-typedef struct HashElem switch_hash_index_t;
+struct switch_hashtable;
+struct switch_hashtable_iterator;
+typedef struct switch_hashtable switch_hash_t;
+typedef struct switch_hashtable_iterator switch_hash_index_t;
struct switch_network_list;
typedef struct switch_network_list switch_network_list_t;
switch_assert(bl);
bl->pool = pool;
- switch_core_hash_init(&bl->list, pool);
+ switch_core_hash_init(&bl->list);
switch_mutex_init(&bl->list_mutex, SWITCH_MUTEX_NESTED, pool);
return bl;
switch_mutex_lock(globals.lists_mutex);
/* Destroy any active lists */
- while ((hi = switch_hash_first(NULL, globals.lists))) {
+ while ((hi = switch_core_hash_first( globals.lists))) {
const void *key;
void *val;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
blacklist_free((blacklist_t*)val);
switch_core_hash_delete(globals.lists, (const char*)key);
}
switch_mutex_lock(globals.lists_mutex);
if (switch_file_open(&fd, filename, SWITCH_FOPEN_WRITE | SWITCH_FOPEN_TRUNCATE | SWITCH_FOPEN_CREATE, SWITCH_FPROT_OS_DEFAULT, globals.pool)
== SWITCH_STATUS_SUCCESS) {
- for (hi = switch_hash_first(NULL, bl->list); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( bl->list); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
switch_file_printf(fd, "%s\n", (char *)var);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "adding %s to the dump file\n", (char *)var);
}
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
- switch_core_hash_init(&globals.files, globals.pool);
+ switch_core_hash_init(&globals.files);
switch_mutex_init(&globals.files_mutex, SWITCH_MUTEX_NESTED, globals.pool);
- switch_core_hash_init(&globals.lists, globals.pool);
+ switch_core_hash_init(&globals.lists);
switch_mutex_init(&globals.lists_mutex, SWITCH_MUTEX_NESTED, globals.pool);
do_config(SWITCH_FALSE);
switch_hash_index_t *hi;
stream->write_function(stream, "%s", "name|strategy|moh_sound|time_base_score|tier_rules_apply|tier_rule_wait_second|tier_rule_wait_multiply_level|tier_rule_no_agent_no_wait|discard_abandoned_after|abandoned_resume_allowed|max_wait_time|max_wait_time_with_no_agent|max_wait_time_with_no_agent_time_reached|record_template\n");
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.queue_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.queue_hash); hi; hi = switch_core_hash_next(hi)) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
cc_queue_t *queue;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
queue = (cc_queue_t *) val;
stream->write_function(stream, "%s|%s|%s|%s|%s|%d|%s|%s|%d|%s|%d|%d|%d|%s\n", queue->name, queue->strategy, queue->moh, queue->time_base_score, (queue->tier_rules_apply?"true":"false"), queue->tier_rule_wait_second, (queue->tier_rule_wait_multiply_level?"true":"false"), (queue->tier_rule_no_agent_no_wait?"true":"false"), queue->discard_abandoned_after, (queue->abandoned_resume_allowed?"true":"false"), queue->max_wait_time, queue->max_wait_time_with_no_agent, queue->max_wait_time_with_no_agent_time_reached, queue->record_template);
queue = NULL;
switch_hash_index_t *hi;
int queue_count = 0;
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.queue_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.queue_hash); hi; hi = switch_core_hash_next(hi)) {
queue_count++;
}
switch_mutex_unlock(globals.mutex);
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
- switch_core_hash_init(&globals.queue_hash, globals.pool);
+ switch_core_hash_init(&globals.queue_hash);
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
if ((status = load_config()) != SWITCH_STATUS_SUCCESS) {
}
switch_mutex_lock(globals.mutex);
- while ((hi = switch_hash_first(NULL, globals.queue_hash))) {
- switch_hash_this(hi, &key, &keylen, &val);
+ while ((hi = switch_core_hash_first( globals.queue_hash))) {
+ switch_core_hash_this(hi, &key, &keylen, &val);
queue = (cc_queue_t *) val;
switch_core_hash_delete(globals.queue_hash, queue->name);
const void *vvar;
switch_mutex_lock(globals.hash_mutex);
- for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
switch_console_push_match(&my_matches, (const char *) vvar);
}
switch_mutex_unlock(globals.hash_mutex);
if (conference == NULL) {
switch_mutex_lock(globals.hash_mutex);
- for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
int fcount = 0;
- switch_hash_this(hi, NULL, NULL, &val);
+ switch_core_hash_this(hi, NULL, NULL, &val);
conference = (conference_obj_t *) val;
stream->write_function(stream, "Conference %s (%u member%s rate: %u%s flags: ",
if (conference == NULL) {
switch_mutex_lock(globals.hash_mutex);
- for (hi = switch_hash_first(NULL, globals.conference_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
conference = (conference_obj_t *) val;
x_conference = switch_xml_add_child_d(x_conferences, "conference", off++);
globals.conference_pool = pool;
/* Setup a hash to store conferences by name */
- switch_core_hash_init(&globals.conference_hash, globals.conference_pool);
+ switch_core_hash_init(&globals.conference_hash);
switch_mutex_init(&globals.conference_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
switch_mutex_init(&globals.id_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
switch_mutex_init(&globals.hash_mutex, SWITCH_MUTEX_NESTED, globals.conference_pool);
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
switch_mutex_init(&globals.db_hash_mutex, SWITCH_MUTEX_NESTED, globals.pool);
- switch_core_hash_init(&globals.db_hash, pool);
+ switch_core_hash_init(&globals.db_hash);
status = switch_event_reserve_subclass(LIMIT_EVENT_USAGE);
if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_INUSE) {
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
- switch_core_hash_init(&globals.profile_hash, globals.pool);
+ switch_core_hash_init(&globals.profile_hash);
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
if ((status = load_config(SWITCH_FALSE)) != SWITCH_STATUS_SUCCESS) {
switch_mutex_lock(globals.mutex);
- while ((hi = switch_hash_first(NULL, globals.profile_hash))) {
- switch_hash_this(hi, &key, &keylen, &val);
+ while ((hi = switch_core_hash_first( globals.profile_hash))) {
+ switch_core_hash_this(hi, &key, &keylen, &val);
profile = (dir_profile_t *) val;
switch_core_hash_delete(globals.profile_hash, profile->name);
switch_file_interface_t *file_interface;
globals.pool = pool;
- switch_core_hash_init(&globals.pickup_hash, globals.pool);
+ switch_core_hash_init(&globals.pickup_hash);
switch_mutex_init(&globals.pickup_mutex, SWITCH_MUTEX_NESTED, globals.pool);
- switch_core_hash_init(&globals.mutex_hash, globals.pool);
+ switch_core_hash_init(&globals.mutex_hash);
switch_mutex_init(&globals.mutex_mutex, SWITCH_MUTEX_NESTED, globals.pool);
/* connect my internal structure to the blank pointer passed to me */
if (globals.use_hash) {
switch_core_hash_destroy(&globals.use_hash);
}
- switch_core_hash_init(&globals.use_hash, globals.pool);
+ switch_core_hash_init(&globals.use_hash);
switch_mutex_unlock(globals.use_mutex);
}
switch_assert(node->fifo_list[x]);
}
- switch_core_hash_init(&node->consumer_hash, node->pool);
+ switch_core_hash_init(&node->consumer_hash);
switch_thread_rwlock_create(&node->rwlock, node->pool);
switch_mutex_init(&node->mutex, SWITCH_MUTEX_NESTED, node->pool);
switch_mutex_init(&node->update_mutex, SWITCH_MUTEX_NESTED, node->pool);
int total = 0;
switch_mutex_lock(node->mutex);
- for (hi = switch_hash_first(NULL, node->consumer_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( node->consumer_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
session = (switch_core_session_t *) val;
channel = switch_core_session_get_channel(session);
if (!switch_channel_test_flag(channel, CF_BRIDGED)) {
x_tmp = switch_xml_add_child_d(xml, container, cc_off++);
switch_assert(x_tmp);
- for (hi = switch_hash_first(NULL, hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(hi)) {
int c_off = 0, d_off = 0;
const char *status;
const char *ts;
char url_buf[512] = "";
char *encoded;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
session = (switch_core_session_t *) val;
channel = switch_core_session_get_channel(session);
x_caller = switch_xml_add_child_d(x_tmp, tag, c_off++);
const void *var;
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
stream->write_function(stream, " %s\n", (char *)var);
}
switch_mutex_unlock(globals.mutex);
fifo_node_t *node;
void *val;
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
if ((node = (fifo_node_t *) val)) {
stream->write_function(stream, "node: %s\n"
" outbound_name: %s\n"
switch_assert(x_report);
if (argc < 2) {
- for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
node = (fifo_node_t *) val;
switch_mutex_lock(node->mutex);
}
} else if (!strcasecmp(argv[0], "count")) {
if (argc < 2) {
- for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
node = (fifo_node_t *) val;
switch_mutex_lock(node->update_mutex);
stream->write_function(stream, "%s:%d:%d:%d:%d:%d\n", (char *) var, node->consumer_count, node_caller_count(node), node->member_count, node->ring_consumer_count, node_idle_consumers(node));
}
} else if (!strcasecmp(argv[0], "has_outbound")) {
if (argc < 2) {
- for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
node = (fifo_node_t *) val;
switch_mutex_lock(node->update_mutex);
stream->write_function(stream, "%s:%d\n", (char *) var, node->has_outbound);
fifo_node_t *node;
void *val;
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
if ((node = (fifo_node_t *) val) && node->is_static && node->ready == 1) {
node->ready = -1;
}
}
globals.pool = pool;
- switch_core_hash_init(&globals.fifo_hash, globals.pool);
+ switch_core_hash_init(&globals.fifo_hash);
- switch_core_hash_init(&globals.caller_orig_hash, globals.pool);
- switch_core_hash_init(&globals.consumer_orig_hash, globals.pool);
- switch_core_hash_init(&globals.bridge_hash, globals.pool);
- switch_core_hash_init(&globals.use_hash, globals.pool);
+ switch_core_hash_init(&globals.caller_orig_hash);
+ switch_core_hash_init(&globals.consumer_orig_hash);
+ switch_core_hash_init(&globals.bridge_hash);
+ switch_core_hash_init(&globals.use_hash);
switch_mutex_init(&globals.caller_orig_mutex, SWITCH_MUTEX_NESTED, globals.pool);
switch_mutex_init(&globals.consumer_orig_mutex, SWITCH_MUTEX_NESTED, globals.pool);
switch_mutex_init(&globals.bridge_mutex, SWITCH_MUTEX_NESTED, globals.pool);
/* This is the first limit check on this channel, create a hashtable, set our prviate data */
pvt = (limit_hash_private_t *) switch_core_session_alloc(session, sizeof(limit_hash_private_t));
memset(pvt, 0, sizeof(limit_hash_private_t));
- switch_core_hash_init(&pvt->hash, switch_core_session_get_pool(session));
+ switch_core_hash_init(&pvt->hash);
switch_channel_set_private(channel, "limit_hash", pvt);
}
/* clear for uuid */
if (realm == NULL && resource == NULL) {
/* Loop through the channel's hashtable which contains mapping to all the limit_hash_item_t referenced by that channel */
- while ((hi = switch_hash_first(NULL, pvt->hash))) {
+ while ((hi = switch_core_hash_first( pvt->hash))) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
limit_hash_item_t *item = NULL;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (limit_hash_item_t *) val;
item->total_usage--;
switch_thread_rwlock_rdlock(globals.limit_hash_rwlock);
- for (hi = switch_hash_first(NULL, globals.limit_hash); hi; switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.limit_hash); hi; switch_core_hash_next(hi)) {
count++;
}
if (mode & 1) {
switch_thread_rwlock_rdlock(globals.limit_hash_rwlock);
- for (hi = switch_hash_first(NULL, globals.limit_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.limit_hash); hi; hi = switch_core_hash_next(hi)) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
limit_hash_item_t *item;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (limit_hash_item_t *)val;
if (mode & 2) {
switch_thread_rwlock_rdlock(globals.db_hash_rwlock);
- for (hi = switch_hash_first(NULL, globals.db_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.db_hash); hi; hi = switch_core_hash_next(hi)) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
if (realm) {
if (strstr(key, realmvalue)) {
stream->write_function(stream, "D/%s/%s\n", key, (char*)val);
stream->write_function(stream, "Remote connections:\nName\t\t\tState\n");
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
- for (hi = switch_hash_first(NULL, globals.remote_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.remote_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
limit_remote_t *item;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (limit_remote_t *)val;
stream->write_function(stream, "%s\t\t\t%s\n", item->name, state_str(item->state));
r->interval = interval;
switch_thread_rwlock_create(&r->rwlock, pool);
- switch_core_hash_init(&r->index, pool);
+ switch_core_hash_init(&r->index);
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
switch_core_hash_insert(globals.remote_hash, name, r);
switch_thread_rwlock_wrlock((*r)->rwlock);
/* Free hashtable data */
- for (hi = switch_hash_first(NULL, (*r)->index); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( (*r)->index); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
free(val);
}
switch_hash_index_t *hi;
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
- for (hi = switch_hash_first(NULL, globals.remote_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.remote_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *hashkey;
switch_ssize_t keylen;
limit_remote_t *remote;
limit_hash_item_t *item;
- switch_hash_this(hi, &hashkey, &keylen, &val);
+ switch_core_hash_this(hi, &hashkey, &keylen, &val);
remote = (limit_remote_t *)val;
if (remote->state != REMOTE_UP) {
switch_thread_rwlock_create(&globals.limit_hash_rwlock, globals.pool);
switch_thread_rwlock_create(&globals.db_hash_rwlock, globals.pool);
switch_thread_rwlock_create(&globals.remote_hash_rwlock, globals.pool);
- switch_core_hash_init(&globals.limit_hash, pool);
- switch_core_hash_init(&globals.db_hash, pool);
- switch_core_hash_init(&globals.remote_hash, globals.pool);
+ switch_core_hash_init(&globals.limit_hash);
+ switch_core_hash_init(&globals.db_hash);
+ switch_core_hash_init(&globals.remote_hash);
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
limit_remote_t *item = NULL;
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
- if ((hi = switch_hash_first(NULL, globals.remote_hash))) {
- switch_hash_this(hi, &key, &keylen, &val);
+ if ((hi = switch_core_hash_first( globals.remote_hash))) {
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (limit_remote_t *)val;
}
switch_thread_rwlock_unlock(globals.remote_hash_rwlock);
switch_thread_rwlock_wrlock(globals.limit_hash_rwlock);
switch_thread_rwlock_wrlock(globals.db_hash_rwlock);
- while ((hi = switch_hash_first(NULL, globals.limit_hash))) {
+ while ((hi = switch_core_hash_first( globals.limit_hash))) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
free(val);
switch_core_hash_delete(globals.limit_hash, key);
}
- while ((hi = switch_hash_first(NULL, globals.db_hash))) {
+ while ((hi = switch_core_hash_first( globals.db_hash))) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
free(val);
switch_core_hash_delete(globals.db_hash, key);
}
cookie_file = val;
} else if (!strcasecmp(var, "enable-post-var")) {
if (!vars_map && need_vars_map == 0) {
- if (switch_core_hash_init(&vars_map, globals.pool) != SWITCH_STATUS_SUCCESS) {
+ if (switch_core_hash_init(&vars_map) != SWITCH_STATUS_SUCCESS) {
need_vars_map = -1;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't init params hash!\n");
continue;
switch_dir_make_recursive(globals.cache_path, SWITCH_DEFAULT_DIR_PERMS, pool);
- switch_core_hash_init(&globals.profile_hash, globals.pool);
- switch_core_hash_init_case(&globals.parse_hash, globals.pool, SWITCH_FALSE);
+ switch_core_hash_init(&globals.profile_hash);
+ switch_core_hash_init_case(&globals.parse_hash, SWITCH_FALSE);
bind_parser("execute", parse_execute);
bind_parser("sms", parse_sms);
void *val;
const void *vvar;
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (client_profile_t *) val;
switch_event_destroy(&profile->dial_params.app_list);
switch_event_destroy(&profile->var_params.expand_var_list);
memset(&gcache, 0, sizeof(url_cache_t));
gcache.pool = pool;
- switch_core_hash_init(&gcache.map, gcache.pool);
- switch_core_hash_init(&gcache.profiles, gcache.pool);
+ switch_core_hash_init(&gcache.map);
+ switch_core_hash_init(&gcache.profiles);
switch_core_hash_init_nocase(&gcache.fqdn_profiles, gcache.pool);
switch_mutex_init(&gcache.mutex, SWITCH_MUTEX_UNNESTED, gcache.pool);
switch_thread_rwlock_create(&gcache.shutdown_lock, gcache.pool);
}
/* allocate the dedup hash */
- if (switch_core_hash_init(&cb_struct->dedup_hash, cb_struct->pool) != SWITCH_STATUS_SUCCESS) {
+ if (switch_core_hash_init(&cb_struct->dedup_hash) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(cb_struct->session), SWITCH_LOG_ERROR, "Error initializing the dedup hash\n");
return SWITCH_STATUS_GENERR;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to determine database RANDOM function\n");
};
- switch_core_hash_init(&globals.profile_hash, globals.pool);
+ switch_core_hash_init(&globals.profile_hash);
if ((x_profiles = switch_xml_child(cfg, "profiles"))) {
for (x_profile = switch_xml_child(x_profiles, "profile"); x_profile; x_profile = x_profile->next) {
char *name = (char *) switch_xml_attr_soft(x_profile, "name");
}
switch_assert(argv[0]);
if (!strcasecmp(argv[0], "show") && !strcasecmp(argv[1], "profiles")) {
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (profile_t *) val;
stream->write_function(stream, "Name:\t\t%s\n", profile->name);
} else {
/* This is the first limit check on this channel, create a hashtable, set our prviate data and add a state handler */
pvt = (limit_redis_private_t *) switch_core_session_alloc(session, sizeof(limit_redis_private_t));
- switch_core_hash_init(&pvt->hash, switch_core_session_get_pool(session));
+ switch_core_hash_init(&pvt->hash));
switch_mutex_init(&pvt->mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
switch_channel_set_private(channel, "limit_redis", pvt);
}
/* clear for uuid */
if (realm == NULL && resource == NULL) {
/* Loop through the channel's hashtable which contains mapping to all the limit_redis_item_t referenced by that channel */
- while ((hi = switch_hash_first(NULL, pvt->hash))) {
+ while ((hi = switch_core_hash_first( pvt->hash))) {
void *p_val = NULL;
const void *p_key;
char *p_uuid_key = NULL;
switch_ssize_t keylen;
- switch_hash_this(hi, &p_key, &keylen, &p_val);
+ switch_core_hash_this(hi, &p_key, &keylen, &p_val);
if (credis_decr(redis, (const char*)p_key, &val) != 0) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Couldn't decrement value corresponding to %s\n", (char *)p_key);
}
switch_core_new_memory_pool(&spandsp_globals.config_pool);
- switch_core_hash_init(&spandsp_globals.tones, spandsp_globals.config_pool);
+ switch_core_hash_init(&spandsp_globals.tones);
spandsp_globals.modem_dialplan = "XML";
spandsp_globals.modem_context = "default";
switch_thread_rwlock_rdlock(globals.spy_hash_lock);
- for (hi = switch_hash_first(NULL, globals.spy_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &key, NULL, &val);
+ for (hi = switch_core_hash_first( globals.spy_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &key, NULL, &val);
spy = (spy_t *) val;
stream->write_function(stream, "%s :");
globals.pool = pool;
- switch_core_hash_init(&globals.spy_hash, pool);
+ switch_core_hash_init(&globals.spy_hash);
switch_thread_rwlock_create(&globals.spy_hash_lock, pool);
globals.spy_count = 0;
switch_mutex_lock(MUTEX);
- while ((hi = switch_hash_first(NULL, globals.translate_profiles))) {
+ while ((hi = switch_core_hash_first( globals.translate_profiles))) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
translate_rule_t *rl, *nrl;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "deleting translate profile [%s]\n", (char *) key);
for (nrl = val; rl;) {
{
switch_mutex_lock(MUTEX);
- switch_core_hash_init(&globals.translate_profiles, globals.pool);
+ switch_core_hash_init(&globals.translate_profiles);
switch_thread_rwlock_create(&globals.profile_hash_rwlock, globals.pool);
load_config();
switch_zmalloc(lot, sizeof(*lot));
lot->name = strdup(name);
switch_mutex_init(&lot->mutex, SWITCH_MUTEX_NESTED, globals.pool);
- switch_core_hash_init(&lot->hash, NULL);
+ switch_core_hash_init(&lot->hash);
switch_core_hash_insert(globals.hash, name, lot);
}
switch_mutex_unlock(globals.mutex);
}
globals.last_timeout_check = now;
- for (hi = switch_hash_first(NULL, globals.hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
switch_console_push_match(&matches, (const char *) var);
}
switch_mutex_unlock(globals.mutex);
top:
- for (i_hi = switch_hash_first(NULL, lot->hash); i_hi; i_hi = switch_hash_next(i_hi)) {
- switch_hash_this(i_hi, &i_var, NULL, &i_val);
+ for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
+ switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
i_ext = (char *) i_var;
token = (valet_token_t *) i_val;
time_t now = switch_epoch_time_now(NULL);
switch_mutex_lock(lot->mutex);
- for (i_hi = switch_hash_first(NULL, lot->hash); i_hi; i_hi = switch_hash_next(i_hi)) {
+ for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
int i;
- switch_hash_this(i_hi, &i_var, NULL, &i_val);
+ switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
token = (valet_token_t *) i_val;
cur = (now - token->start_time);
i = atoi(token->ext);
now = switch_epoch_time_now(NULL);
switch_mutex_lock(lot->mutex);
- for (i_hi = switch_hash_first(NULL, lot->hash); i_hi; i_hi = switch_hash_next(i_hi)) {
- switch_hash_this(i_hi, &i_var, NULL, &i_val);
+ for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
+ switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
token = (valet_token_t *) i_val;
if (token->timeout > 0 && (token->timeout < now || token->timeout == 1)) {
continue;
stream->write_function(stream, "<lots>\n");
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
switch_hash_index_t *i_hi;
const void *i_var;
void *i_val;
char *i_ext;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
name = (char *) var;
lot = (valet_lot_t *) val;
stream->write_function(stream, " <lot name=\"%s\">\n", name);
switch_mutex_lock(lot->mutex);
- for (i_hi = switch_hash_first(NULL, lot->hash); i_hi; i_hi = switch_hash_next(i_hi)) {
+ for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
valet_token_t *token;
- switch_hash_this(i_hi, &i_var, NULL, &i_val);
+ switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
i_ext = (char *) i_var;
token = (valet_token_t *) i_val;
const char *nvar;
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
nvar = (const char *) var;
if (!strchr(nvar, '@') || switch_stristr(domain_name, nvar)) {
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
- switch_core_hash_init(&globals.hash, NULL);
+ switch_core_hash_init(&globals.hash);
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
/* connect my internal structure to the blank pointer passed to me */
/* Kept for backwards-compatibility */
switch_hash_index_t *hi;
switch_mutex_lock(globals.mutex);
- if ((hi = switch_hash_first(NULL, globals.profile_hash))) {
+ if ((hi = switch_core_hash_first( globals.profile_hash))) {
void *val;
- switch_hash_this(hi, NULL, NULL, &val);
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (vm_profile_t *) val;
total_new_messages = total_saved_messages = 0;
message_count(profile, id, domain, "inbox", &total_new_messages, &total_saved_messages,
"Cound not find a profile for domain: [%s] Returning 0 messages\nWhen message-query-exact-match is enabled you must have a dedicated vm profile per distinct domain name you wish to use.\n", domain);
}
} else {
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (vm_profile_t *) val;
parse_profile();
} else if (!strcasecmp(argv[0], "status")) {
stream->write_function(stream, "============================\n");
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (vm_profile_t *) val;
stream->write_function(stream, "Profile: %s\n", profile->name);
}
void *value;
switch_mutex_lock(globals.mutex);
- for (index = switch_hash_first(NULL, globals.profile_hash); index; index = switch_hash_next(index)) {
- switch_hash_this(index, NULL, NULL, &value);
+ for (index = switch_core_hash_first( globals.profile_hash); index; index = switch_core_hash_next(index)) {
+ switch_core_hash_this(index, NULL, NULL, &value);
profile = (vm_profile_t *) value;
if (profile) {
switch_thread_rwlock_rdlock(profile->rwlock);
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
- switch_core_hash_init(&globals.profile_hash, globals.pool);
+ switch_core_hash_init(&globals.profile_hash);
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
switch_mutex_lock(globals.mutex);
}
switch_mutex_lock(globals.mutex);
- while ((hi = switch_hash_first(NULL, globals.profile_hash))) {
- switch_hash_this(hi, &key, &keylen, &val);
+ while ((hi = switch_core_hash_first( globals.profile_hash))) {
+ switch_core_hash_this(hi, &key, &keylen, &val);
profile = (vm_profile_t *) val;
switch_core_hash_delete(globals.profile_hash, profile->name);
lprofile->gsl_mime_type = "application/x-nuance-gsl";
lprofile->jsgf_mime_type = "application/x-jsgf";
lprofile->ssml_mime_type = "application/ssml+xml";
- switch_core_hash_init(&lprofile->default_synth_params, pool);
- switch_core_hash_init(&lprofile->default_recog_params, pool);
+ switch_core_hash_init(&lprofile->default_synth_params);
+ switch_core_hash_init(&lprofile->default_recog_params);
*profile = lprofile;
if (globals.enable_profile_events && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, MY_EVENT_PROFILE_CREATE) == SWITCH_STATUS_SUCCESS) {
status = SWITCH_STATUS_FALSE;
goto done;
}
- switch_core_hash_init(&schan->params, pool);
+ switch_core_hash_init(&schan->params);
schan->data = NULL;
if (zstr(name)) {
schan->name = "";
{
/* loop through each param and add to synth header or vendor-specific-params */
switch_hash_index_t *hi = NULL;
- for (hi = switch_hash_first(NULL, schannel->params); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( schannel->params); hi; hi = switch_core_hash_next(hi)) {
char *param_name = NULL, *param_val = NULL;
const void *key;
void *val;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
param_name = (char *) key;
param_val = (char *) val;
if (!zstr(param_name) && !zstr(param_val)) {
}
/* Set default TTS params */
- for (hi = switch_hash_first(NULL, profile->default_synth_params); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( profile->default_synth_params); hi; hi = switch_core_hash_next(hi)) {
char *param_name = NULL, *param_val = NULL;
const void *key;
void *val;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
param_name = (char *) key;
param_val = (char *) val;
speech_channel_set_param(schannel, param_name, param_val);
r->timers_started = zstr(start_input_timers) || strcasecmp(start_input_timers, "false");
/* count enabled grammars */
- for (egk = switch_hash_first(NULL, r->enabled_grammars); egk; egk = switch_hash_next(egk)) {
+ for (egk = switch_core_hash_first( r->enabled_grammars); egk; egk = switch_core_hash_next(egk)) {
// NOTE: This postponed type check is necessary to allow a non-URI-list grammar to execute alone
if (grammar_uri_count == 1 && grammar->type != GRAMMAR_TYPE_URI)
goto no_grammar_alone;
++grammar_uri_count;
- switch_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
+ switch_core_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
if (grammar->type != GRAMMAR_TYPE_URI && grammar_uri_count != 1) {
no_grammar_alone:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "(%s) Grammar '%s' can only be used alone (not a URI list)\n", schannel->name, key);
/* get the enabled grammars list */
grammar_uri_list = switch_core_alloc(schannel->memory_pool, grammar_uri_list_len + 1);
grammar_uri_list_len = 0;
- for (egk = switch_hash_first(NULL, r->enabled_grammars); egk; egk = switch_hash_next(egk)) {
- switch_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
+ for (egk = switch_core_hash_first( r->enabled_grammars); egk; egk = switch_core_hash_next(egk)) {
+ switch_core_hash_this(egk, (void *) &key, NULL, (void *) &grammar);
len = strlen(grammar->data);
if (!len)
continue;
recognizer_data_t *r = (recognizer_data_t *) schannel->data;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "(%s) Disabling all grammars\n", schannel->name);
switch_core_hash_destroy(&r->enabled_grammars);
- switch_core_hash_init(&r->enabled_grammars, schannel->memory_pool);
+ switch_core_hash_init(&r->enabled_grammars);
return status;
}
{
/* loop through each param and add to recog header or vendor-specific-params */
switch_hash_index_t *hi = NULL;
- for (hi = switch_hash_first(NULL, schannel->params); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( schannel->params); hi; hi = switch_core_hash_next(hi)) {
char *param_name = NULL, *param_val = NULL;
const void *key;
void *val;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
param_name = (char *) key;
param_val = (char *) val;
if (!zstr(param_name) && !zstr(param_val)) {
r = (recognizer_data_t *) switch_core_alloc(ah->memory_pool, sizeof(recognizer_data_t));
schannel->data = r;
memset(r, 0, sizeof(recognizer_data_t));
- switch_core_hash_init(&r->grammars, ah->memory_pool);
- switch_core_hash_init(&r->enabled_grammars, ah->memory_pool);
+ switch_core_hash_init(&r->grammars);
+ switch_core_hash_init(&r->enabled_grammars);
/* Open the channel */
if (zstr(profile_name)) {
}
/* Set default ASR params */
- for (hi = switch_hash_first(NULL, profile->default_recog_params); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( profile->default_recog_params); hi; hi = switch_core_hash_next(hi)) {
char *param_name = NULL, *param_val = NULL;
const void *key;
void *val;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
param_name = (char *) key;
param_val = (char *) val;
speech_channel_set_param(schannel, param_name, param_val);
#define STATS_FORMAT "%-10.10s %-10.10s %-10.10s %-10.10s %-10.10s %-10.10s %-10.10s %-10.10s %-10.10s %-10.10s %-15.15s %-15.15s\n"
stream->write_function(stream, STATS_FORMAT,
"Session", "Codec", "Enc", "Dec", "Enc Tx", "Enc Rx", "Dec Tx", "Dec Rx", "Enc Lost", "Dec Lost", "Enc AvgRxMs", "Dec AvgRxMs");
- for (hi = switch_hash_first(NULL, g_sessions_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( g_sessions_hash); hi; hi = switch_core_hash_next(hi)) {
struct sangoma_transcoding_session *sess;
char sessid_str[25];
char encoder_tx_str[25];
char encoder_avgrxus_str[25];
char decoder_avgrxus_str[25];
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
sess = val;
snprintf(sessid_str, sizeof(sessid_str), "%lu", sess->sessid);
switch_mutex_init(&g_sessions_lock, SWITCH_MUTEX_UNNESTED, pool);
- switch_core_hash_init(&g_sessions_hash, pool);
+ switch_core_hash_init(&g_sessions_hash);
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
- switch_core_hash_init(&globals.call_hash, module_pool);
+ switch_core_hash_init(&globals.call_hash);
switch_mutex_init(&globals.device_lock, SWITCH_MUTEX_NESTED, module_pool);
switch_mutex_init(&globals.pvt_lock, SWITCH_MUTEX_NESTED, module_pool);
switch_mutex_init(&globals.flag_mutex, SWITCH_MUTEX_NESTED, module_pool);
switch_mprintf("select sub_from, sub_to,'%q','%q','%q','%q' from jabber_subscriptions where sub_to = '%q%q'", type, rpid, status, proto, pstr,
from);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (mdl_profile_t *) val;
if (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
sql = switch_mprintf("select *,'%q' from jabber_subscriptions", status ? status : "");
}
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (mdl_profile_t *) val;
if (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
mdl_profile_t *profile;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "IP change detected [%s]->[%s]\n", old_ip4, new_ip4);
if (globals.profile_hash) {
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (mdl_profile_t *) val;
if (old_ip4 && profile->extip && !strcmp(profile->extip, old_ip4)) {
tmp = profile->extip;
sql = switch_mprintf("select * from jabber_subscriptions");
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (mdl_profile_t *) val;
if (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
switch_console_callback_match_t *my_matches = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (mdl_profile_t *) val;
if (!strncmp("dl_logout", line, 9)) {
if (profile->handle) {
if (argv[0] && !strncasecmp(argv[0], "status", 6)) {
stream->write_function(stream, "--DingaLing status--\n");
stream->write_function(stream, "login | connected\n");
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (mdl_profile_t *) val;
stream->write_function(stream, "%s | ", profile->login);
if (profile->handle && ldl_handle_authorized(profile->handle)) {
void *data = NULL;
switch_hash_t *name_hash;
switch_hash_index_t *hi;
- switch_core_hash_init(&name_hash, module_pool);
+ switch_core_hash_init(&name_hash);
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
switch_xml_free(xml);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &data);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &data);
profile = (mdl_profile_t *) data;
if (switch_core_hash_find(name_hash, profile->name)) {
}
}
- for (hi = switch_hash_first(NULL, name_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &data);
+ for (hi = switch_core_hash_first( name_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &data);
if ((profile = switch_core_hash_find(globals.profile_hash, (char *) data))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Deleting unused profile %s [%s]\n", profile->name, profile->login);
switch_find_local_ip(globals.guess_ip, sizeof(globals.guess_ip), NULL, AF_INET);
- switch_core_hash_init(&globals.profile_hash, module_pool);
+ switch_core_hash_init(&globals.profile_hash);
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
memset(&globals, 0, sizeof(globals));
- switch_core_hash_init(&globals.call_hash, module_pool);
- switch_core_hash_init(&globals.sh_streams, module_pool);
- switch_core_hash_init(&globals.endpoints, module_pool);
+ switch_core_hash_init(&globals.call_hash);
+ switch_core_hash_init(&globals.sh_streams);
+ switch_core_hash_init(&globals.endpoints);
switch_mutex_init(&globals.device_lock, SWITCH_MUTEX_NESTED, module_pool);
switch_mutex_init(&globals.pvt_lock, SWITCH_MUTEX_NESTED, module_pool);
switch_mutex_init(&globals.streams_lock, SWITCH_MUTEX_NESTED, module_pool);
{
switch_hash_index_t *hi;
int cnt = 0;
- for (hi = switch_hash_first(NULL, globals.sh_streams); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.sh_streams); hi; hi = switch_core_hash_next(hi)) {
const void *var;
void *val;
shared_audio_stream_t *s = NULL;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
s = val;
stream->write_function(stream, "%s> indev: %d, outdev: %d, sample-rate: %d, codec-ms: %d, channels: %d\n",
s->name, s->indev, s->outdev, s->sample_rate, s->codec_ms, s->channels);
{
switch_hash_index_t *hi;
int cnt = 0;
- for (hi = switch_hash_first(NULL, globals.endpoints); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.endpoints); hi; hi = switch_core_hash_next(hi)) {
const void *var;
void *val;
audio_endpoint_t *e = NULL;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
e = val;
stream->write_function(stream, "%s> instream: %s, outstream: %s\n",
e->name, e->in_stream ? e->in_stream->name : "(none)",
switch_core_hash_insert_wrlock(rtmp_globals.session_hash, (*newsession)->uuid, *newsession, rtmp_globals.session_rwlock);
switch_core_hash_insert_wrlock(profile->session_hash, (*newsession)->uuid, *newsession, profile->session_rwlock);
- switch_core_hash_init(&(*newsession)->session_hash, pool);
+ switch_core_hash_init(&(*newsession)->session_hash);
switch_thread_rwlock_create(&(*newsession)->session_rwlock, pool);
#ifdef RTMP_DEBUG_IO
top:
- for (hi = switch_hash_first(NULL, rtmp_globals.session_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( rtmp_globals.session_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
rtmp_session_t *rsession;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
rsession = (rtmp_session_t *) val;
if (rsession->state == RS_DESTROY) {
int sess = 0;
switch_thread_rwlock_rdlock((*rsession)->session_rwlock);
- for (hi = switch_hash_first(NULL, (*rsession)->session_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( (*rsession)->session_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
switch_channel_t *channel;
switch_core_session_t *session;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
/* If there are any sessions attached, abort the destroy operation */
if ((session = switch_core_session_locate((char *)key)) != NULL ) {
switch_thread_rwlock_create(&profile->rwlock, pool);
switch_mutex_init(&profile->mutex, SWITCH_MUTEX_NESTED, pool);
- switch_core_hash_init(&profile->session_hash, pool);
+ switch_core_hash_init(&profile->session_hash);
switch_thread_rwlock_create(&profile->session_rwlock, pool);
switch_thread_rwlock_create(&profile->reg_rwlock, pool);
- switch_core_hash_init(&profile->reg_hash, pool);
+ switch_core_hash_init(&profile->reg_hash);
if (!strcmp(profile->io_name, "tcp")) {
if (rtmp_tcp_init(profile, profile->bind_address, &profile->io, pool) != SWITCH_STATUS_SUCCESS) {
switch_thread_rwlock_wrlock((*profile)->rwlock);
/* Kill all sessions */
- while ((hi = switch_hash_first(NULL, (*profile)->session_hash))) {
+ while ((hi = switch_core_hash_first( (*profile)->session_hash))) {
void *val;
rtmp_session_t *session;
const void *key;
switch_ssize_t keylen;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
session = val;
stream->write_function(stream, "\nSessions:\n");
stream->write_function(stream, "uuid,address,user,domain,flashVer,state\n");
switch_thread_rwlock_rdlock(profile->session_rwlock);
- for (hi = switch_hash_first(NULL, profile->session_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( profile->session_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
rtmp_session_t *item;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (rtmp_session_t *)val;
stream->write_function(stream, "%s,%s:%d,%s,%s,%s,%s\n",
stream->write_function(stream, "user,nickname,uuid\n");
switch_thread_rwlock_rdlock(profile->reg_rwlock);
- for (hi = switch_hash_first(NULL, profile->reg_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( profile->reg_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
rtmp_reg_t *item;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (rtmp_reg_t *)val;
for (;item;item = item->next) {
} else {
switch_hash_index_t *hi;
switch_thread_rwlock_rdlock(rtmp_globals.profile_rwlock);
- for (hi = switch_hash_first(NULL, rtmp_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( rtmp_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
rtmp_profile_t *item;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (rtmp_profile_t *)val;
stream->write_function(stream, "%s\t%s:%s\tprofile\n", item->name, item->io->name, item->io->address);
switch_console_callback_match_t *my_matches = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
- for (hi = switch_hash_first(NULL, hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
switch_console_push_match(&my_matches, (const char *) vvar);
}
memset(&rtmp_globals, 0, sizeof(rtmp_globals));
switch_mutex_init(&rtmp_globals.mutex, SWITCH_MUTEX_NESTED, pool);
- switch_core_hash_init(&rtmp_globals.profile_hash, pool);
- switch_core_hash_init(&rtmp_globals.session_hash, pool);
- switch_core_hash_init(&rtmp_globals.invoke_hash, pool);
+ switch_core_hash_init(&rtmp_globals.profile_hash);
+ switch_core_hash_init(&rtmp_globals.session_hash);
+ switch_core_hash_init(&rtmp_globals.invoke_hash);
switch_thread_rwlock_create(&rtmp_globals.profile_rwlock, pool);
switch_thread_rwlock_create(&rtmp_globals.session_rwlock, pool);
switch_hash_index_t *hi;
switch_mutex_lock(rtmp_globals.mutex);
- while ((hi = switch_hash_first(NULL, rtmp_globals.profile_hash))) {
+ while ((hi = switch_core_hash_first( rtmp_globals.profile_hash))) {
void *val;
const void *key;
switch_ssize_t keylen;
rtmp_profile_t *item;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (rtmp_profile_t *)val;
if (disallow_multiple_registration) {
switch_hash_index_t *hi;
switch_thread_rwlock_rdlock(rsession->profile->session_rwlock);
- for (hi = switch_hash_first(NULL, rsession->profile->session_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( rsession->profile->session_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
rtmp_session_t *item;
- switch_hash_this(hi, &key, &keylen, &val);
+ switch_core_hash_this(hi, &key, &keylen, &val);
item = (rtmp_session_t *)val;
if (rtmp_session_check_user(item, user, domain) == SWITCH_STATUS_SUCCESS) {
skinny_profile_t *profile = NULL, *tmp_profile;
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
tmp_profile = (skinny_profile_t *) val;
switch_mutex_lock(tmp_profile->listener_mutex);
/* walk listeners */
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (skinny_profile_t *) val;
profile_walk_listeners(profile, callback, pvt);
}
/* Soft Key Set Sets */
- switch_core_hash_init(&profile->soft_key_set_sets_hash, profile->pool);
+ switch_core_hash_init(&profile->soft_key_set_sets_hash);
if ((xsoft_key_set_sets = switch_xml_child(xprofile, "soft-key-set-sets"))) {
switch_xml_t xsoft_key_set_set;
for (xsoft_key_set_set = switch_xml_child(xsoft_key_set_sets, "soft-key-set-set"); xsoft_key_set_set; xsoft_key_set_set = xsoft_key_set_set->next) {
/* Device types */
- switch_core_hash_init(&profile->device_type_params_hash, profile->pool);
+ switch_core_hash_init(&profile->device_type_params_hash);
if ((xdevice_types = switch_xml_child(xprofile, "device-types"))) {
switch_xml_t xdevice_type;
for (xdevice_type = switch_xml_child(xdevice_types, "device-type"); xdevice_type; xdevice_type = xdevice_type->next) {
switch_mutex_lock(globals.mutex);
if (globals.profile_hash) {
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (skinny_profile_t *) val) && profile->auto_restart) {
if (!strcmp(profile->ip, old_ip4)) {
skinny_profile_set(profile, "ip", new_ip4);
return SWITCH_STATUS_TERM;
}
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
- switch_core_hash_init(&globals.profile_hash, globals.pool);
+ switch_core_hash_init(&globals.profile_hash);
globals.running = 1;
globals.auto_restart = SWITCH_TRUE;
load_skinny_config();
/* at least one profile */
- if (!switch_hash_first(NULL, globals.profile_hash)) {
+ if (!switch_core_hash_first( globals.profile_hash)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No profile found!\n");
return SWITCH_STATUS_TERM;
}
/* launch listeners */
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
void *val;
skinny_profile_t *profile;
- switch_hash_this(hi, NULL, NULL, &val);
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (skinny_profile_t *) val;
launch_skinny_profile_thread(profile);
/* close sockets */
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
skinny_profile_t *profile;
- switch_hash_this(hi, NULL, NULL, &val);
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (skinny_profile_t *) val;
close_socket(&profile->sock, profile);
/* walk profiles */
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (skinny_profile_t *) val;
switch_console_push_match(&my_matches, profile->name);
stream->write_function(stream, "%25s\t%32s\t%s\t%s\t%s\n", "Profile::Gateway-Name", " Data ", "State", "IB Calls(F/T)", "OB Calls(F/T)");
stream->write_function(stream, "%s\n", line);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
stream->write_function(stream, "%25s\t%s\t %40s\t%s\n", "Name", " Type", "Data", "State");
stream->write_function(stream, "%s\n", line);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
stream->write_function(stream, "<gateways>\n", header);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
stream->write_function(stream, "%s\n", header);
stream->write_function(stream, "<profiles>\n");
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
const void *var;
void *val;
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val) && !strcmp((char *)var, profile->name)) {
select_from_profile(profile, user, domain, concat, exclude_contact, &mystream, SWITCH_TRUE);
profile = NULL;
const void *var;
void *val;
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val) && !strcmp((char *)var, profile->name)) {
get_presence_data(profile, user, domain, search, stream);
profile = NULL;
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash && !zstr(old_ip4) && !zstr(new_ip4)) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val)) {
if (!zstr(profile->extsipip) && !strcmp(profile->extsipip, old_ip4)) {
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
int rb = 0;
uint32_t x = 0;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val) && profile->auto_restart) {
if (!strcmp(profile->sipip, old_ip4)) {
profile->sipip = switch_core_strdup(profile->pool, new_ip4);
switch_status_t status = SWITCH_STATUS_FALSE;
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (!show_aliases && strcmp((char *)vvar, profile->name)) {
switch_status_t status = SWITCH_STATUS_FALSE;
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
sofia_gateway_t *gp;
strcpy(mod_sofia_globals.hostname, switch_core_get_switchname());
- switch_core_hash_init(&mod_sofia_globals.profile_hash, mod_sofia_globals.pool);
- switch_core_hash_init(&mod_sofia_globals.gateway_hash, mod_sofia_globals.pool);
+ switch_core_hash_init(&mod_sofia_globals.profile_hash);
+ switch_core_hash_init(&mod_sofia_globals.gateway_hash);
switch_mutex_init(&mod_sofia_globals.hash_mutex, SWITCH_MUTEX_NESTED, mod_sofia_globals.pool);
switch_mutex_lock(mod_sofia_globals.mutex);
}
profile->dbname = switch_core_strdup(profile->pool, url);
- switch_core_hash_init(&profile->chat_hash, profile->pool);
- switch_core_hash_init(&profile->reg_nh_hash, profile->pool);
- switch_core_hash_init(&profile->mwi_debounce_hash, profile->pool);
+ switch_core_hash_init(&profile->chat_hash);
+ switch_core_hash_init(&profile->reg_nh_hash);
+ switch_core_hash_init(&profile->mwi_debounce_hash);
switch_thread_rwlock_create(&profile->rwlock, profile->pool);
switch_mutex_init(&profile->flag_mutex, SWITCH_MUTEX_NESTED, profile->pool);
profile->dtmf_duration = 100;
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val)) {
if (!(nh = nua_handle_by_replaces(profile->nua, replaces))) {
nh = nua_handle_by_call_id(profile->nua, replaces->rp_call_id);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
int rsec = 10;
int diff = (int) (switch_epoch_time_now(NULL) - pptr->started);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
nua_set_params(pptr->nua, TPTAG_LOG(on), TAG_END());
}
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
if (on) {
sofia_set_pflag_locked(pptr, PFLAG_STANDBY);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
nua_set_params(pptr->nua, TPTAG_CAPT(on ? mod_sofia_globals.capture_server : NULL), TAG_END());
}
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
pptr->watchdog_enabled = (on ? 1 : 0);
}
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
- for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val) && pptr == profile) {
aliases[i++] = strdup((char *) var);
if (i == 512) {
h4235 = switch_core_alloc(pool, sizeof(*h4235));
h4235->pool = pool;
h4235->profile = profile;
- switch_core_hash_init(&h4235->hash, h4235->pool);
+ switch_core_hash_init(&h4235->hash);
sofia_glue_execute_sql_callback(profile, profile->dbh_mutex, sql, sofia_dialog_probe_callback, h4235);
switch_safe_free(sql);
if (mod_sofia_globals.debug_presence > 0) {
switch_core_new_memory_pool(&pool);
sh = switch_core_alloc(pool, sizeof(*sh));
sh->pool = pool;
- switch_core_hash_init(&sh->hash, sh->pool);
+ switch_core_hash_init(&sh->hash);
sql = switch_mprintf("select sip_from_user,sip_from_host,call_info,call_info_state,uuid from sip_dialogs "
"where call_info_state is not null and call_info_state != '' and call_info_state != 'idle' and hostname='%q' and profile_name='%q' "
switch_mutex_lock(profile->flag_mutex);
if (profile->reg_nh_hash) {
top:
- for (hi = switch_hash_first(NULL, profile->reg_nh_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( profile->reg_nh_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((nh = (nua_handle_t *) val)) {
nua_handle_unref(nh);
nua_handle_destroy(nh);
void *val;
switch_mutex_lock(mod_sofia_globals.hash_mutex);
- for (hi = switch_hash_first(NULL, mod_sofia_globals.gateway_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( mod_sofia_globals.gateway_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if (key && (gateway = (sofia_gateway_t *) val) && !gateway->deleted && gateway->register_realm && !strcasecmp(gateway->register_realm, key)) {
break;
} else {
module_pool = pool;
memset(&globals, 0, sizeof(globals));
- switch_core_hash_init(&globals.call_hash, module_pool);
+ switch_core_hash_init(&globals.call_hash);
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
switch_mutex_init(&globals.hash_mutex, SWITCH_MUTEX_NESTED, module_pool);
switch_mutex_init(&globals.channel_mutex, SWITCH_MUTEX_NESTED, module_pool);
}
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.fd_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
fd = (cdr_fd_t *) val;
switch_mutex_lock(fd->mutex);
do_rotate(fd);
void *val;
cdr_fd_t *fd;
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, globals.fd_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
fd = (cdr_fd_t *) val;
switch_mutex_lock(fd->mutex);
if (fd->fd > -1) {
switch_status_t status = SWITCH_STATUS_SUCCESS;
memset(&globals, 0, sizeof(globals));
- switch_core_hash_init(&globals.fd_hash, pool);
- switch_core_hash_init(&globals.template_hash, pool);
+ switch_core_hash_init(&globals.fd_hash);
+ switch_core_hash_init(&globals.template_hash);
globals.pool = pool;
}
if (sig && !strcmp(sig, "HUP")) {
- for (hi = switch_hash_first(NULL, globals.fd_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
fd = (cdr_fd_t *) val;
switch_mutex_lock(fd->mutex);
do_rotate(fd);
}
memset(&globals, 0, sizeof(globals));
- switch_core_hash_init(&globals.fd_hash, pool);
+ switch_core_hash_init(&globals.fd_hash);
switch_mutex_init(&globals.db_mutex, SWITCH_MUTEX_NESTED, pool);
globals.pool = pool;
switch_status_t status = SWITCH_STATUS_SUCCESS;
memset(&globals, 0, sizeof(globals));
- switch_core_hash_init(&globals.template_hash, pool);
+ switch_core_hash_init(&globals.template_hash);
globals.pool = pool;
}
/* create new hash */
- switch_core_hash_init(&event_hash, listener->pool);
+ switch_core_hash_init(&event_hash);
if(!switch_test_flag(listener, LFLAG_EVENTS)) {
switch_set_flag_locked(listener, LFLAG_EVENTS);
}
/* create new hash */
- switch_core_hash_init(&event_hash, session->pool);
+ switch_core_hash_init(&event_hash);
for (i = 1; i < arity; i++){
if (!ei_decode_atom(buf->buff, &buf->index, atom)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hashed ref to %s\n", hash);
switch_thread_rwlock_rdlock(listener->session_rwlock);
- for (iter = switch_hash_first(NULL, listener->sessions); iter; iter = switch_hash_next(iter)) {
- switch_hash_this(iter, &key, NULL, &val);
+ for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
+ switch_core_hash_this(iter, &key, NULL, &val);
se = (session_elem_t*)val;
if (se->spawn_reply && !strncmp(se->spawn_reply->hash, hash, 100)) {
session_elem_t *session = NULL;
switch_thread_rwlock_rdlock(listener->session_rwlock);
- for (iter = switch_hash_first(NULL, listener->sessions); iter; iter = switch_hash_next(iter)) {
- switch_hash_this(iter, &key, NULL, &val);
+ for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
+ switch_core_hash_this(iter, &key, NULL, &val);
if (((session_elem_t*)val)->process.type == ERLANG_PID && !ei_compare_pids(pid, &((session_elem_t*)val)->process.pid)) {
session = (session_elem_t*)val;
/* TODO try to minimize critical section */
switch_thread_rwlock_rdlock(listener->session_rwlock);
- for (iter = switch_hash_first(NULL, listener->sessions); iter; iter = switch_hash_next(iter)) {
- switch_hash_this(iter, &key, NULL, &value);
+ for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
+ switch_core_hash_this(iter, &key, NULL, &value);
sp = (session_elem_t*)value;
if (switch_test_flag(sp, LFLAG_WAITING_FOR_PID)) {
continue;
switch_thread_rwlock_create(&listener->event_rwlock, pool);
switch_thread_rwlock_create(&listener->session_rwlock, listener->pool);
- switch_core_hash_init(&listener->event_hash, listener->pool);
- switch_core_hash_init(&listener->sessions, listener->pool);
+ switch_core_hash_init(&listener->event_hash);
+ switch_core_hash_init(&listener->sessions);
return listener;
}
/* clean up all the attached sessions */
switch_thread_rwlock_wrlock(listener->session_rwlock);
- for (iter = switch_hash_first(NULL, listener->sessions); iter; iter = switch_hash_next(iter)) {
- switch_hash_this(iter, &key, NULL, &value);
+ for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
+ switch_core_hash_this(iter, &key, NULL, &value);
s = (session_elem_t*)value;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Orphaning call %s\n", s->uuid_str);
destroy_session_elem(s);
switch_queue_create(&session_element->event_queue, SWITCH_CORE_QUEUE_LEN, session_element->pool);
switch_mutex_init(&session_element->flag_mutex, SWITCH_MUTEX_NESTED, session_element->pool);
- switch_core_hash_init(&session_element->event_hash, session_element->pool);
+ switch_core_hash_init(&session_element->event_hash);
session_element->spawn_reply = NULL;
for (x = 0; x <= SWITCH_EVENT_ALL; x++) {
switch_hash_index_t *iter;
switch_thread_rwlock_rdlock(listener->session_rwlock);
- for (iter = switch_hash_first(NULL, listener->sessions); iter; iter = switch_hash_next(iter)) {
+ for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
count++;
}
switch_thread_rwlock_unlock(listener->session_rwlock);
found = 1;
switch_thread_rwlock_rdlock(l->session_rwlock);
- for (iter = switch_hash_first(NULL, l->sessions); iter; iter = switch_hash_next(iter)) {
+ for (iter = switch_core_hash_first( l->sessions); iter; iter = switch_core_hash_next(iter)) {
empty = 0;
- switch_hash_this(iter, &key, NULL, &value);
+ switch_core_hash_this(iter, &key, NULL, &value);
sp = (session_elem_t*)value;
stream->write_function(stream, "Outbound session for %s in state %s\n", sp->uuid_str,
switch_channel_state_name(sp->channel_state));
}
stream->write_function(stream, "CUSTOM:\n", switch_event_name(x));
- for (iter = switch_hash_first(NULL, l->event_hash); iter; iter = switch_hash_next(iter)) {
- switch_hash_this(iter, &key, NULL, &val);
+ for (iter = switch_core_hash_first( l->event_hash); iter; iter = switch_core_hash_next(iter)) {
+ switch_core_hash_this(iter, &key, NULL, &val);
stream->write_function(stream, "\t%s\n", (char *)key);
}
stream->write_function(stream, "\n", (char *)key);
switch_thread_rwlock_create(&globals.bindings_rwlock, pool);
switch_mutex_init(&globals.fetch_reply_mutex, SWITCH_MUTEX_DEFAULT, pool);
switch_mutex_init(&globals.listener_count_mutex, SWITCH_MUTEX_UNNESTED, pool);
- switch_core_hash_init(&globals.fetch_reply_hash, pool);
+ switch_core_hash_init(&globals.fetch_reply_hash);
/* intialize the unique reference stuff */
switch_mutex_init(&globals.ref_mutex, SWITCH_MUTEX_NESTED, pool);
switch_safe_free(globals.psk);
globals.psk = NULL;
}
- switch_core_hash_init(&globals.event_hash, module_pool);
+ switch_core_hash_init(&globals.event_hash);
memset(globals.event_list, 0, SWITCH_EVENT_ALL + 1);
if (load_config() != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to reload config file\n");
struct peer_status *last;
char *host;
- for (cur = switch_hash_first(NULL, globals.peer_hash); cur; cur = switch_hash_next(cur)) {
- switch_hash_this(cur, &key, &keylen, &value);
+ for (cur = switch_core_hash_first( globals.peer_hash); cur; cur = switch_core_hash_next(cur)) {
+ switch_core_hash_this(cur, &key, &keylen, &value);
host = (char *) key;
last = (struct peer_status *) value;
if (last->active && (now - (last->lastseen)) > 60) {
char *host;
int i = 0;
- for (cur = switch_hash_first(NULL, globals.peer_hash); cur; cur = switch_hash_next(cur)) {
- switch_hash_this(cur, &key, &keylen, &value);
+ for (cur = switch_core_hash_first( globals.peer_hash); cur; cur = switch_core_hash_next(cur)) {
+ switch_core_hash_this(cur, &key, &keylen, &value);
host = (char *) key;
last = (struct peer_status *) value;
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, pool);
module_pool = pool;
- switch_core_hash_init(&globals.event_hash, module_pool);
- switch_core_hash_init(&globals.peer_hash, module_pool);
+ switch_core_hash_init(&globals.event_hash);
+ switch_core_hash_init(&globals.peer_hash);
globals.key_count = 0;
switch_mutex_init(&listener->flag_mutex, SWITCH_MUTEX_NESTED, listener->pool);
switch_mutex_init(&listener->filter_mutex, SWITCH_MUTEX_NESTED, listener->pool);
- switch_core_hash_init(&listener->event_hash, listener->pool);
+ switch_core_hash_init(&listener->event_hash);
switch_set_flag(listener, LFLAG_AUTHED);
switch_set_flag(listener, LFLAG_OUTBOUND);
for (x = 1; x < argc; x++) {
switch_mutex_init(&listener->filter_mutex, SWITCH_MUTEX_NESTED, listener->pool);
- switch_core_hash_init(&listener->event_hash, listener->pool);
+ switch_core_hash_init(&listener->event_hash);
switch_set_flag(listener, LFLAG_AUTHED);
switch_set_flag(listener, LFLAG_STATEFUL);
switch_set_flag(listener, LFLAG_ALLOW_LOG);
switch_snprintf(event_reply, sizeof(event_reply), "Allowed-Events: %s\n", allowed_events);
- switch_core_hash_init(&listener->allowed_event_hash, listener->pool);
+ switch_core_hash_init(&listener->allowed_event_hash);
edup = strdup(allowed_events);
cur = edup;
switch_snprintf(api_reply, sizeof(api_reply), "Allowed-API: %s\n", allowed_api);
- switch_core_hash_init(&listener->allowed_api_hash, listener->pool);
+ switch_core_hash_init(&listener->allowed_api_hash);
edup = strdup(allowed_api);
cur = edup;
}
/* wipe the hash */
switch_core_hash_destroy(&listener->event_hash);
- switch_core_hash_init(&listener->event_hash, listener->pool);
+ switch_core_hash_init(&listener->event_hash);
switch_snprintf(reply, reply_len, "+OK no longer listening for events");
} else {
switch_snprintf(reply, reply_len, "-ERR not listening for events");
switch_mutex_init(&listener->flag_mutex, SWITCH_MUTEX_NESTED, listener->pool);
switch_mutex_init(&listener->filter_mutex, SWITCH_MUTEX_NESTED, listener->pool);
- switch_core_hash_init(&listener->event_hash, listener->pool);
+ switch_core_hash_init(&listener->event_hash);
switch_socket_create_pollset(&listener->pollfd, listener->sock, SWITCH_POLLIN | SWITCH_POLLERR, listener->pool);
status = SWITCH_STATUS_SUCCESS;
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
cdr_profile_t *profile;
- switch_hash_this(hi, NULL, NULL, &val);
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (cdr_profile_t *) val;
tmpstatus = my_on_reporting_cb(session, profile);
const char *sig = switch_event_get_header(event, "Trapped-Signal");
if (sig && !strcmp(sig, "HUP")) {
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
cdr_profile_t *profile;
- switch_hash_this(hi, NULL, NULL, &val);
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (cdr_profile_t *) val;
if (profile->rotate) {
globals.pool = pool;
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
- switch_core_hash_init(&globals.profile_hash, globals.pool);
+ switch_core_hash_init(&globals.profile_hash);
/* parse the config */
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_event_unbind(&globals.node);
switch_core_remove_state_handler(&state_handlers);
- for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
cdr_profile_t *profile;
- switch_hash_this(hi, NULL, NULL, &val);
+ switch_core_hash_this(hi, NULL, NULL, &val);
profile = (cdr_profile_t *) val;
if ( profile ) {
{
switch_hash_index_t *hi = NULL;
switch_mutex_lock(globals.clients_mutex);
- for (hi = switch_hash_first(NULL, globals.clients_roster); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.clients_roster); hi; hi = switch_core_hash_next(hi)) {
struct rayo_client *rclient;
const void *key;
void *val;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
rclient = (struct rayo_client *)val;
switch_assert(rclient);
}
/* send <end> to all offered clients */
- for (hi = switch_hash_first(NULL, call->pcps); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( call->pcps); hi; hi = switch_core_hash_next(hi)) {
const void *key;
void *val;
const char *client_jid = NULL;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
client_jid = (const char *)key;
switch_assert(client_jid);
iks_insert_attrib(revent, "to", client_jid);
call->dial_request_id = NULL;
call->end_event = NULL;
call->dial_request_failed = 0;
- switch_core_hash_init(&call->pcps, pool);
+ switch_core_hash_init(&call->pcps);
}
switch_safe_free(call_jid);
char *mixer_jid = switch_mprintf("%s@%s", name, RAYO_JID(globals.server));
mixer = RAYO_MIXER(rayo_actor_init(RAYO_ACTOR(mixer), pool, RAT_MIXER, "", name, mixer_jid, rayo_mixer_cleanup, rayo_mixer_send, file, line));
if (mixer) {
- switch_core_hash_init(&mixer->members, pool);
- switch_core_hash_init(&mixer->subscribers, pool);
+ switch_core_hash_init(&mixer->members);
+ switch_core_hash_init(&mixer->subscribers);
}
switch_safe_free(mixer_jid);
return mixer;
}
rserver = RAYO_PEER_SERVER(RAYO_ACTOR_INIT(RAYO_ACTOR(rserver), pool, RAT_PEER_SERVER, "", jid, jid, rayo_peer_server_cleanup, rayo_peer_server_send));
if (rserver) {
- switch_core_hash_init(&rserver->clients, pool);
+ switch_core_hash_init(&rserver->clients);
} else {
switch_core_destroy_memory_pool(&pool);
}
/* Offer call to all ONLINE clients */
/* TODO load balance offers so first session doesn't always get offer first? */
switch_mutex_lock(globals.clients_mutex);
- for (hi = switch_hash_first(NULL, globals.clients_roster); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( globals.clients_roster); hi; hi = switch_core_hash_next(hi)) {
struct rayo_client *rclient;
const void *key;
void *val;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
rclient = (struct rayo_client *)val;
switch_assert(rclient);
struct rayo_actor *actor;
switch_mutex_lock(globals.actors_mutex);
- for (hi = switch_hash_first(NULL, globals.actors); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( globals.actors); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
actor = (struct rayo_actor *) val;
if (match(actor)) {
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
- switch_core_hash_init(&globals.command_handlers, pool);
- switch_core_hash_init(&globals.event_handlers, pool);
- switch_core_hash_init(&globals.clients_roster, pool);
+ switch_core_hash_init(&globals.command_handlers);
+ switch_core_hash_init(&globals.event_handlers);
+ switch_core_hash_init(&globals.clients_roster);
switch_mutex_init(&globals.clients_mutex, SWITCH_MUTEX_NESTED, pool);
- switch_core_hash_init(&globals.actors, pool);
- switch_core_hash_init(&globals.destroy_actors, pool);
- switch_core_hash_init(&globals.actors_by_id, pool);
+ switch_core_hash_init(&globals.actors);
+ switch_core_hash_init(&globals.destroy_actors);
+ switch_core_hash_init(&globals.actors_by_id);
switch_mutex_init(&globals.actors_mutex, SWITCH_MUTEX_NESTED, pool);
- switch_core_hash_init(&globals.dial_gateways, pool);
- switch_core_hash_init(&globals.cmd_aliases, pool);
+ switch_core_hash_init(&globals.dial_gateways);
+ switch_core_hash_init(&globals.cmd_aliases);
switch_thread_rwlock_create(&globals.shutdown_rwlock, pool);
switch_queue_create(&globals.msg_queue, 25000, pool);
static struct tag_def *add_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
{
struct tag_def *def = switch_core_alloc(globals.pool, sizeof(*def));
- switch_core_hash_init(&def->children_tags, globals.pool);
+ switch_core_hash_init(&def->children_tags);
if (!zstr(children_tags)) {
char *children_tags_dup = switch_core_strdup(globals.pool, children_tags);
char *tags[32] = { 0 };
globals.init = SWITCH_TRUE;
switch_core_new_memory_pool(&globals.pool);
- switch_core_hash_init(&globals.tag_defs, globals.pool);
+ switch_core_hash_init(&globals.tag_defs);
add_root_tag_def("result", process_attribs_ignore, process_cdata_ignore, "interpretation");
add_tag_def("interpretation", process_attribs_ignore, process_cdata_ignore, "input,model,xf:model,instance,xf:instance");
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Subscribe %s => %s\n", signal_type, jid);
if (!signal_subscribers) {
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Create %s subscriber hash\n", signal_type);
- switch_core_hash_init(&signal_subscribers, NULL);
+ switch_core_hash_init(&signal_subscribers);
switch_core_hash_insert(globals.subscribers, key, signal_subscribers);
}
switch_core_hash_insert(signal_subscribers, jid, "1");
return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create CPA entity");
}
- switch_core_hash_init(&component->signals, pool);
+ switch_core_hash_init(&component->signals);
/* start CPA detectors */
for (grammar = iks_find(input, "grammar"); grammar; grammar = iks_next_tag(grammar)) {
switch_event_bind("rayo_cpa_component", SWITCH_EVENT_CHANNEL_HANGUP_COMPLETE, NULL, on_channel_hangup_complete_event, NULL);
globals.pool = pool;
- switch_core_hash_init(&globals.subscribers, pool);
+ switch_core_hash_init(&globals.subscribers);
switch_mutex_init(&globals.subscribers_mutex, SWITCH_MUTEX_NESTED, pool);
return rayo_cpa_detector_load(module_interface, pool, config_file);
return SWITCH_STATUS_TERM;
}
- switch_core_hash_init(&bound_events, pool);
+ switch_core_hash_init(&bound_events);
cpa_xml = switch_xml_child(cfg, "cpa");
if (cpa_xml) {
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CPA detector: %s\n", name);
detector = switch_core_alloc(pool, sizeof(*detector));
- switch_core_hash_init(&detector->signal_type_map, pool);
+ switch_core_hash_init(&detector->signal_type_map);
detector->name = switch_core_strdup(pool, name);
switch_uuid_str(id, sizeof(id));
detector->uuid = switch_core_strdup(pool, id);
const void *vvar;
switch_console_callback_match_t *my_matches = NULL;
- for (hi = switch_hash_first(NULL, globals.detectors); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &val);
+ for (hi = switch_core_hash_first( globals.detectors); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &val);
switch_console_push_match(&my_matches, (const char *) vvar);
}
switch_console_set_complete("add rayo_cpa ::console::list_uuid ::rayo_cpa::list_signal_types stop");
switch_console_add_complete_func("::rayo_cpa::list_signal_types", rayo_cpa_detector_signal_types);
- switch_core_hash_init(&globals.detectors, pool);
+ switch_core_hash_init(&globals.detectors);
if (do_config(pool, config_file) != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_TERM;
}
/* create input component */
handler = switch_core_session_alloc(session, sizeof(*handler));
switch_mutex_init(&handler->mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
- switch_core_hash_init(&handler->dtmf_components, NULL);
+ switch_core_hash_init(&handler->dtmf_components);
switch_channel_set_private(switch_core_session_get_channel(session), RAYO_INPUT_COMPONENT_PRIVATE_VAR, handler);
handler->last_recognizer = "";
file_interface->file_seek = rayo_file_seek;
switch_mutex_init(&fileman_globals.mutex, SWITCH_MUTEX_NESTED, pool);
- switch_core_hash_init(&fileman_globals.hash, pool);
+ switch_core_hash_init(&fileman_globals.hash);
file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
file_interface->interface_name = "mod_rayo";
static struct tag_def *add_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
{
struct tag_def *def = switch_core_alloc(globals.pool, sizeof(*def));
- switch_core_hash_init(&def->children_tags, globals.pool);
+ switch_core_hash_init(&def->children_tags);
if (!zstr(children_tags)) {
char *children_tags_dup = switch_core_strdup(globals.pool, children_tags);
char *tags[32] = { 0 };
grammar->root = NULL;
grammar->cur = NULL;
grammar->uuid = (parser && !zstr(parser->uuid)) ? switch_core_strdup(pool, parser->uuid) : "";
- switch_core_hash_init(&grammar->rules, pool);
+ switch_core_hash_init(&grammar->rules);
switch_mutex_init(&grammar->mutex, SWITCH_MUTEX_NESTED, pool);
return grammar;
}
parser = switch_core_alloc(pool, sizeof(*parser));
parser->pool = pool;
parser->uuid = zstr(uuid) ? "" : switch_core_strdup(pool, uuid);
- switch_core_hash_init(&parser->cache, pool);
+ switch_core_hash_init(&parser->cache);
switch_mutex_init(&parser->mutex, SWITCH_MUTEX_NESTED, pool);
}
return parser;
globals.init = SWITCH_TRUE;
switch_core_new_memory_pool(&globals.pool);
- switch_core_hash_init(&globals.tag_defs, globals.pool);
+ switch_core_hash_init(&globals.tag_defs);
add_root_tag_def("grammar", process_grammar, process_cdata_bad, "meta,metadata,lexicon,tag,rule");
add_tag_def("ruleref", process_ruleref, process_cdata_bad, "");
context = switch_core_alloc(pool, sizeof(*context));
context->pool = pool;
switch_mutex_init(&context->streams_mutex, SWITCH_MUTEX_NESTED, context->pool);
- switch_core_hash_init(&context->routes, context->pool);
- switch_core_hash_init(&context->streams, context->pool);
+ switch_core_hash_init(&context->routes);
+ switch_core_hash_init(&context->streams);
context->dialback_secret = switch_core_strdup(context->pool, domain_secret);
context->ready_callback = ready;
context->destroy_callback = destroy;
context->shutdown = 0;
context->domain = switch_core_strdup(context->pool, domain);
switch_thread_rwlock_create(&context->shutdown_rwlock, context->pool);
- switch_core_hash_init(&context->users, context->pool);
+ switch_core_hash_init(&context->users);
return context;
}
switch_mutex_lock(globals.mutex);
if (zstr(cmd)) {
- for (hi = switch_hash_first(NULL, globals.source_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( globals.source_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((source = (local_stream_source_t *) val)) {
stream->write_function(stream, "%s,%s\n", source->name, source->location);
}
memset(&globals, 0, sizeof(globals));
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, pool);
- switch_core_hash_init(&globals.source_hash, pool);
+ switch_core_hash_init(&globals.source_hash);
if (!launch_streams(NULL)) {
return SWITCH_STATUS_GENERR;
}
globals.running = 1;
globals.threads = 0;
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
- switch_core_hash_init(&globals.source_hash, module_pool);
+ switch_core_hash_init(&globals.source_hash);
/* indicate that the module should continue to be loaded */
{
switch_file_interface_t *file_interface;
- switch_core_hash_init(&globals.format_hash, pool);
+ switch_core_hash_init(&globals.format_hash);
if (setup_formats() != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
static struct tag_def *add_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
{
struct tag_def *def = switch_core_alloc(globals.pool, sizeof(*def));
- switch_core_hash_init(&def->children_tags, globals.pool);
+ switch_core_hash_init(&def->children_tags);
if (!zstr(children_tags)) {
char *children_tags_dup = switch_core_strdup(globals.pool, children_tags);
char *tags[32] = { 0 };
}
/* find best language, name, gender match */
- for (hi = switch_hash_first(NULL, map); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( map); hi; hi = switch_core_hash_next(hi)) {
const void *key;
void *val;
struct voice *candidate;
int candidate_score = 0;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
candidate = (struct voice *)val;
candidate_score = score_voice(candidate, cur_node, lang_required);
if (candidate_score > 0 && candidate_score > best_score) {
*/
globals.pool = pool;
- switch_core_hash_init(&globals.voice_cache, pool);
- switch_core_hash_init(&globals.tts_voice_map, pool);
- switch_core_hash_init(&globals.say_voice_map, pool);
- switch_core_hash_init(&globals.interpret_as_map, pool);
- switch_core_hash_init(&globals.language_map, pool);
- switch_core_hash_init(&globals.tag_defs, pool);
+ switch_core_hash_init(&globals.voice_cache);
+ switch_core_hash_init(&globals.tts_voice_map);
+ switch_core_hash_init(&globals.say_voice_map);
+ switch_core_hash_init(&globals.interpret_as_map);
+ switch_core_hash_init(&globals.language_map);
+ switch_core_hash_init(&globals.tag_defs);
add_root_tag_def("speak", process_xml_lang, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,p,s,lexicon,metadata,meta");
add_tag_def("p", process_xml_lang, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,s");
}\r
\r
\r
-SWIGEXPORT void * SWIGSTDCALL CSharp_switch_hash_first(char * jarg1, void * jarg2) {\r
+SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_hash_first(char * jarg1, void * jarg2) {\r
void * jresult ;\r
char *arg1 = (char *) 0 ;\r
switch_hash_t *arg2 = (switch_hash_t *) 0 ;\r
\r
arg1 = (char *)jarg1; \r
arg2 = (switch_hash_t *)jarg2; \r
- result = (switch_hash_index_t *)switch_hash_first(arg1,arg2);\r
+ result = (switch_hash_index_t *)switch_core_hash_first(arg1,arg2);\r
jresult = (void *)result; \r
return jresult;\r
}\r
\r
\r
-SWIGEXPORT void * SWIGSTDCALL CSharp_switch_hash_next(void * jarg1) {\r
+SWIGEXPORT void * SWIGSTDCALL CSharp_switch_core_hash_next(void * jarg1) {\r
void * jresult ;\r
switch_hash_index_t *arg1 = (switch_hash_index_t *) 0 ;\r
switch_hash_index_t *result = 0 ;\r
\r
arg1 = (switch_hash_index_t *)jarg1; \r
- result = (switch_hash_index_t *)switch_hash_next(arg1);\r
+ result = (switch_hash_index_t *)switch_core_hash_next(arg1);\r
jresult = (void *)result; \r
return jresult;\r
}\r
\r
\r
-SWIGEXPORT void SWIGSTDCALL CSharp_switch_hash_this(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {\r
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_core_hash_this(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {\r
switch_hash_index_t *arg1 = (switch_hash_index_t *) 0 ;\r
void **arg2 = (void **) 0 ;\r
switch_ssize_t *arg3 = (switch_ssize_t *) 0 ;\r
arg2 = (void **)jarg2; \r
arg3 = (switch_ssize_t *)jarg3; \r
arg4 = (void **)jarg4; \r
- switch_hash_this(arg1,(void const **)arg2,arg3,arg4);\r
+ switch_core_hash_this(arg1,(void const **)arg2,arg3,arg4);\r
}\r
\r
\r
}
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_type_set(void * jarg1, int jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_media_type_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (switch_media_type_t)jarg2;
+ if (arg1) (arg1)->type = arg2;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_payload_map_t_type_get(void * jarg1) {
+ int jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_media_type_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (switch_media_type_t) ((arg1)->type);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_sdp_type_set(void * jarg1, int jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_sdp_type_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (switch_sdp_type_t)jarg2;
+ if (arg1) (arg1)->sdp_type = arg2;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_payload_map_t_sdp_type_get(void * jarg1) {
+ int jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_sdp_type_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (switch_sdp_type_t) ((arg1)->sdp_type);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_ptime_set(void * jarg1, unsigned long jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint32_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (uint32_t)jarg2;
+ if (arg1) (arg1)->ptime = arg2;
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_payload_map_t_ptime_get(void * jarg1) {
+ unsigned long jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint32_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (uint32_t) ((arg1)->ptime);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_rate_set(void * jarg1, unsigned long jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint32_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (uint32_t)jarg2;
+ if (arg1) (arg1)->rate = arg2;
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_payload_map_t_rate_get(void * jarg1) {
+ unsigned long jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint32_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (uint32_t) ((arg1)->rate);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_allocated_set(void * jarg1, unsigned char jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint8_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (uint8_t)jarg2;
+ if (arg1) (arg1)->allocated = arg2;
+}
+
+
+SWIGEXPORT unsigned char SWIGSTDCALL CSharp_payload_map_t_allocated_get(void * jarg1) {
+ unsigned char jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint8_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (uint8_t) ((arg1)->allocated);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_negotiated_set(void * jarg1, unsigned char jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint8_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (uint8_t)jarg2;
+ if (arg1) (arg1)->negotiated = arg2;
+}
+
+
+SWIGEXPORT unsigned char SWIGSTDCALL CSharp_payload_map_t_negotiated_get(void * jarg1) {
+ unsigned char jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint8_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (uint8_t) ((arg1)->negotiated);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_current_set(void * jarg1, unsigned char jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint8_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (uint8_t)jarg2;
+ if (arg1) (arg1)->current = arg2;
+}
+
+
+SWIGEXPORT unsigned char SWIGSTDCALL CSharp_payload_map_t_current_get(void * jarg1) {
+ unsigned char jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint8_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (uint8_t) ((arg1)->current);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_hash_set(void * jarg1, unsigned long jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ unsigned long arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (unsigned long)jarg2;
+ if (arg1) (arg1)->hash = arg2;
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_payload_map_t_hash_get(void * jarg1) {
+ unsigned long jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ unsigned long result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (unsigned long) ((arg1)->hash);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_rm_encoding_set(void * jarg1, char * jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (char *)jarg2;
+ {
+ delete [] arg1->rm_encoding;
+ if (arg2) {
+ arg1->rm_encoding = (char *) (new char[strlen((const char *)arg2)+1]);
+ strcpy((char *)arg1->rm_encoding, (const char *)arg2);
+ } else {
+ arg1->rm_encoding = 0;
+ }
+ }
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_payload_map_t_rm_encoding_get(void * jarg1) {
+ char * jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *result = 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (char *) ((arg1)->rm_encoding);
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_iananame_set(void * jarg1, char * jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (char *)jarg2;
+ {
+ delete [] arg1->iananame;
+ if (arg2) {
+ arg1->iananame = (char *) (new char[strlen((const char *)arg2)+1]);
+ strcpy((char *)arg1->iananame, (const char *)arg2);
+ } else {
+ arg1->iananame = 0;
+ }
+ }
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_payload_map_t_iananame_get(void * jarg1) {
+ char * jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *result = 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (char *) ((arg1)->iananame);
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_pt_set(void * jarg1, unsigned char jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_payload_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (switch_payload_t)jarg2;
+ if (arg1) (arg1)->pt = arg2;
+}
+
+
+SWIGEXPORT unsigned char SWIGSTDCALL CSharp_payload_map_t_pt_get(void * jarg1) {
+ unsigned char jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_payload_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (switch_payload_t) ((arg1)->pt);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_rm_rate_set(void * jarg1, unsigned long jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ unsigned long arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (unsigned long)jarg2;
+ if (arg1) (arg1)->rm_rate = arg2;
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_payload_map_t_rm_rate_get(void * jarg1) {
+ unsigned long jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ unsigned long result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (unsigned long) ((arg1)->rm_rate);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_adv_rm_rate_set(void * jarg1, unsigned long jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ unsigned long arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (unsigned long)jarg2;
+ if (arg1) (arg1)->adv_rm_rate = arg2;
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_payload_map_t_adv_rm_rate_get(void * jarg1) {
+ unsigned long jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ unsigned long result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (unsigned long) ((arg1)->adv_rm_rate);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_codec_ms_set(void * jarg1, unsigned long jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint32_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (uint32_t)jarg2;
+ if (arg1) (arg1)->codec_ms = arg2;
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_payload_map_t_codec_ms_get(void * jarg1) {
+ unsigned long jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint32_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (uint32_t) ((arg1)->codec_ms);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_bitrate_set(void * jarg1, unsigned long jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint32_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (uint32_t)jarg2;
+ if (arg1) (arg1)->bitrate = arg2;
+}
+
+
+SWIGEXPORT unsigned long SWIGSTDCALL CSharp_payload_map_t_bitrate_get(void * jarg1) {
+ unsigned long jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ uint32_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (uint32_t) ((arg1)->bitrate);
+ jresult = (unsigned long)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_rm_fmtp_set(void * jarg1, char * jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (char *)jarg2;
+ {
+ delete [] arg1->rm_fmtp;
+ if (arg2) {
+ arg1->rm_fmtp = (char *) (new char[strlen((const char *)arg2)+1]);
+ strcpy((char *)arg1->rm_fmtp, (const char *)arg2);
+ } else {
+ arg1->rm_fmtp = 0;
+ }
+ }
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_payload_map_t_rm_fmtp_get(void * jarg1) {
+ char * jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *result = 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (char *) ((arg1)->rm_fmtp);
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_agreed_pt_set(void * jarg1, unsigned char jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_payload_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (switch_payload_t)jarg2;
+ if (arg1) (arg1)->agreed_pt = arg2;
+}
+
+
+SWIGEXPORT unsigned char SWIGSTDCALL CSharp_payload_map_t_agreed_pt_get(void * jarg1) {
+ unsigned char jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_payload_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (switch_payload_t) ((arg1)->agreed_pt);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_recv_pt_set(void * jarg1, unsigned char jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_payload_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (switch_payload_t)jarg2;
+ if (arg1) (arg1)->recv_pt = arg2;
+}
+
+
+SWIGEXPORT unsigned char SWIGSTDCALL CSharp_payload_map_t_recv_pt_get(void * jarg1) {
+ unsigned char jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_payload_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (switch_payload_t) ((arg1)->recv_pt);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_fmtp_out_set(void * jarg1, char * jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (char *)jarg2;
+ {
+ delete [] arg1->fmtp_out;
+ if (arg2) {
+ arg1->fmtp_out = (char *) (new char[strlen((const char *)arg2)+1]);
+ strcpy((char *)arg1->fmtp_out, (const char *)arg2);
+ } else {
+ arg1->fmtp_out = 0;
+ }
+ }
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_payload_map_t_fmtp_out_get(void * jarg1) {
+ char * jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *result = 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (char *) ((arg1)->fmtp_out);
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_remote_sdp_ip_set(void * jarg1, char * jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (char *)jarg2;
+ {
+ delete [] arg1->remote_sdp_ip;
+ if (arg2) {
+ arg1->remote_sdp_ip = (char *) (new char[strlen((const char *)arg2)+1]);
+ strcpy((char *)arg1->remote_sdp_ip, (const char *)arg2);
+ } else {
+ arg1->remote_sdp_ip = 0;
+ }
+ }
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_payload_map_t_remote_sdp_ip_get(void * jarg1) {
+ char * jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ char *result = 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (char *) ((arg1)->remote_sdp_ip);
+ jresult = SWIG_csharp_string_callback((const char *)result);
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_remote_sdp_port_set(void * jarg1, unsigned short jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_port_t arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (switch_port_t)jarg2;
+ if (arg1) (arg1)->remote_sdp_port = arg2;
+}
+
+
+SWIGEXPORT unsigned short SWIGSTDCALL CSharp_payload_map_t_remote_sdp_port_get(void * jarg1) {
+ unsigned short jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ switch_port_t result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (switch_port_t) ((arg1)->remote_sdp_port);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_channels_set(void * jarg1, int jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ int arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (int)jarg2;
+ if (arg1) (arg1)->channels = arg2;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_payload_map_t_channels_get(void * jarg1) {
+ int jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ int result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (int) ((arg1)->channels);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_adv_channels_set(void * jarg1, int jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ int arg2 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (int)jarg2;
+ if (arg1) (arg1)->adv_channels = arg2;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_payload_map_t_adv_channels_get(void * jarg1) {
+ int jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ int result;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (int) ((arg1)->adv_channels);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_payload_map_t_next_set(void * jarg1, void * jarg2) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ payload_map_s *arg2 = (payload_map_s *) 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ arg2 = (payload_map_s *)jarg2;
+ if (arg1) (arg1)->next = arg2;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_payload_map_t_next_get(void * jarg1) {
+ void * jresult ;
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+ payload_map_s *result = 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ result = (payload_map_s *) ((arg1)->next);
+ jresult = (void *)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_new_payload_map_t() {
+ void * jresult ;
+ payload_map_s *result = 0 ;
+
+ result = (payload_map_s *)new payload_map_s();
+ jresult = (void *)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_delete_payload_map_t(void * jarg1) {
+ payload_map_s *arg1 = (payload_map_s *) 0 ;
+
+ arg1 = (payload_map_s *)jarg1;
+ delete arg1;
+}
+
+
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_db_close(void * jarg1) {
int jresult ;
switch_core_db_t *arg1 = (switch_core_db_t *) 0 ;
}
-SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_hash_init_case(void * jarg1, void * jarg2, int jarg3) {
+SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_hash_init_case(void * jarg1, int jarg2) {
int jresult ;
switch_hash_t **arg1 = (switch_hash_t **) 0 ;
- switch_memory_pool_t *arg2 = (switch_memory_pool_t *) 0 ;
- switch_bool_t arg3 ;
+ switch_bool_t arg2 ;
switch_status_t result;
arg1 = (switch_hash_t **)jarg1;
- arg2 = (switch_memory_pool_t *)jarg2;
- arg3 = (switch_bool_t)jarg3;
- result = (switch_status_t)switch_core_hash_init_case(arg1,arg2,arg3);
+ arg2 = (switch_bool_t)jarg2;
+ result = (switch_status_t)switch_core_hash_init_case(arg1,arg2);
jresult = result;
return jresult;
}
}
-SWIGEXPORT void * SWIGSTDCALL CSharp_switch_hash_first(char * jarg1, void * jarg2) {
- void * jresult ;
- char *arg1 = (char *) 0 ;
- switch_hash_t *arg2 = (switch_hash_t *) 0 ;
- switch_hash_index_t *result = 0 ;
-
- arg1 = (char *)jarg1;
- arg2 = (switch_hash_t *)jarg2;
- result = (switch_hash_index_t *)switch_hash_first(arg1,arg2);
- jresult = (void *)result;
- return jresult;
-}
-
-
-SWIGEXPORT void * SWIGSTDCALL CSharp_switch_hash_next(void * jarg1) {
- void * jresult ;
- switch_hash_index_t *arg1 = (switch_hash_index_t *) 0 ;
- switch_hash_index_t *result = 0 ;
-
- arg1 = (switch_hash_index_t *)jarg1;
- result = (switch_hash_index_t *)switch_hash_next(arg1);
- jresult = (void *)result;
- return jresult;
-}
-
-
-SWIGEXPORT void SWIGSTDCALL CSharp_switch_hash_this(void * jarg1, void * jarg2, void * jarg3, void * jarg4) {
- switch_hash_index_t *arg1 = (switch_hash_index_t *) 0 ;
- void **arg2 = (void **) 0 ;
- switch_ssize_t *arg3 = (switch_ssize_t *) 0 ;
- void **arg4 = (void **) 0 ;
-
- arg1 = (switch_hash_index_t *)jarg1;
- arg2 = (void **)jarg2;
- arg3 = (switch_ssize_t *)jarg3;
- arg4 = (void **)jarg4;
- switch_hash_this(arg1,(void const **)arg2,arg3,arg4);
-}
-
-
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_timer_init(void * jarg1, char * jarg2, int jarg3, int jarg4, void * jarg5) {
int jresult ;
switch_timer_t *arg1 = (switch_timer_t *) 0 ;
}
-SWIGEXPORT int SWIGSTDCALL CSharp_SWITCH_RTP_KEY_LEN_get() {
- int jresult ;
- int result;
+SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_RTP_CRYPTO_KEY_80_get() {
+ char * jresult ;
+ char *result = 0 ;
- result = (int)(30);
- jresult = result;
+ result = (char *)("AES_CM_128_HMAC_SHA1_80");
+ jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
-SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_RTP_CRYPTO_KEY_32_get() {
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_srtp_crypto_suite_t_name_set(void * jarg1, char * jarg2) {
+ switch_srtp_crypto_suite_s *arg1 = (switch_srtp_crypto_suite_s *) 0 ;
+ char *arg2 = (char *) 0 ;
+
+ arg1 = (switch_srtp_crypto_suite_s *)jarg1;
+ arg2 = (char *)jarg2;
+ {
+ delete [] arg1->name;
+ if (arg2) {
+ arg1->name = (char *) (new char[strlen((const char *)arg2)+1]);
+ strcpy((char *)arg1->name, (const char *)arg2);
+ } else {
+ arg1->name = 0;
+ }
+ }
+}
+
+
+SWIGEXPORT char * SWIGSTDCALL CSharp_switch_srtp_crypto_suite_t_name_get(void * jarg1) {
char * jresult ;
+ switch_srtp_crypto_suite_s *arg1 = (switch_srtp_crypto_suite_s *) 0 ;
char *result = 0 ;
- result = (char *)("AES_CM_128_HMAC_SHA1_32");
+ arg1 = (switch_srtp_crypto_suite_s *)jarg1;
+ result = (char *) ((arg1)->name);
jresult = SWIG_csharp_string_callback((const char *)result);
return jresult;
}
-SWIGEXPORT char * SWIGSTDCALL CSharp_SWITCH_RTP_CRYPTO_KEY_80_get() {
- char * jresult ;
- char *result = 0 ;
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_srtp_crypto_suite_t_type_set(void * jarg1, int jarg2) {
+ switch_srtp_crypto_suite_s *arg1 = (switch_srtp_crypto_suite_s *) 0 ;
+ switch_rtp_crypto_key_type_t arg2 ;
- result = (char *)("AES_CM_128_HMAC_SHA1_80");
- jresult = SWIG_csharp_string_callback((const char *)result);
+ arg1 = (switch_srtp_crypto_suite_s *)jarg1;
+ arg2 = (switch_rtp_crypto_key_type_t)jarg2;
+ if (arg1) (arg1)->type = arg2;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_switch_srtp_crypto_suite_t_type_get(void * jarg1) {
+ int jresult ;
+ switch_srtp_crypto_suite_s *arg1 = (switch_srtp_crypto_suite_s *) 0 ;
+ switch_rtp_crypto_key_type_t result;
+
+ arg1 = (switch_srtp_crypto_suite_s *)jarg1;
+ result = (switch_rtp_crypto_key_type_t) ((arg1)->type);
+ jresult = result;
return jresult;
}
+SWIGEXPORT void SWIGSTDCALL CSharp_switch_srtp_crypto_suite_t_keylen_set(void * jarg1, int jarg2) {
+ switch_srtp_crypto_suite_s *arg1 = (switch_srtp_crypto_suite_s *) 0 ;
+ int arg2 ;
+
+ arg1 = (switch_srtp_crypto_suite_s *)jarg1;
+ arg2 = (int)jarg2;
+ if (arg1) (arg1)->keylen = arg2;
+}
+
+
+SWIGEXPORT int SWIGSTDCALL CSharp_switch_srtp_crypto_suite_t_keylen_get(void * jarg1) {
+ int jresult ;
+ switch_srtp_crypto_suite_s *arg1 = (switch_srtp_crypto_suite_s *) 0 ;
+ int result;
+
+ arg1 = (switch_srtp_crypto_suite_s *)jarg1;
+ result = (int) ((arg1)->keylen);
+ jresult = result;
+ return jresult;
+}
+
+
+SWIGEXPORT void * SWIGSTDCALL CSharp_new_switch_srtp_crypto_suite_t() {
+ void * jresult ;
+ switch_srtp_crypto_suite_s *result = 0 ;
+
+ result = (switch_srtp_crypto_suite_s *)new switch_srtp_crypto_suite_s();
+ jresult = (void *)result;
+ return jresult;
+}
+
+
+SWIGEXPORT void SWIGSTDCALL CSharp_delete_switch_srtp_crypto_suite_t(void * jarg1) {
+ switch_srtp_crypto_suite_s *arg1 = (switch_srtp_crypto_suite_s *) 0 ;
+
+ arg1 = (switch_srtp_crypto_suite_s *)jarg1;
+ delete arg1;
+}
+
+
SWIGEXPORT void SWIGSTDCALL CSharp_switch_rtp_crypto_key_index_set(void * jarg1, unsigned long jarg2) {
switch_rtp_crypto_key *arg1 = (switch_rtp_crypto_key *) 0 ;
uint32_t arg2 ;
}
-SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_activate_ice(void * jarg1, char * jarg2, char * jarg3, char * jarg4, char * jarg5, int jarg6, void * jarg7, void * jarg8) {
+SWIGEXPORT int SWIGSTDCALL CSharp_switch_rtp_activate_ice(void * jarg1, char * jarg2, char * jarg3, char * jarg4, char * jarg5, int jarg6, int jarg7, void * jarg8) {
int jresult ;
switch_rtp_t *arg1 = (switch_rtp_t *) 0 ;
char *arg2 = (char *) 0 ;
ice_proto_t arg6 ;
switch_core_media_ice_type_t arg7 ;
ice_t *arg8 = (ice_t *) 0 ;
- switch_core_media_ice_type_t *argp7 ;
switch_status_t result;
arg1 = (switch_rtp_t *)jarg1;
arg4 = (char *)jarg4;
arg5 = (char *)jarg5;
arg6 = (ice_proto_t)jarg6;
- argp7 = (switch_core_media_ice_type_t *)jarg7;
- if (!argp7) {
- SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null switch_core_media_ice_type_t", 0);
- return 0;
- }
- arg7 = *argp7;
+ arg7 = (switch_core_media_ice_type_t)jarg7;
arg8 = (ice_t *)jarg8;
result = (switch_status_t)switch_rtp_activate_ice(arg1,arg2,arg3,(char const *)arg4,(char const *)arg5,arg6,arg7,arg8);
jresult = result;
freeswitchPINVOKE.switch_core_hash_this(SWIGTYPE_p_HashElem.getCPtr(hi), SWIGTYPE_p_p_void.getCPtr(key), SWIGTYPE_p_switch_ssize_t.getCPtr(klen), SWIGTYPE_p_p_void.getCPtr(val));\r
}\r
\r
- public static SWIGTYPE_p_HashElem switch_hash_first(string deprecate_me, SWIGTYPE_p_switch_hash hash) {\r
- IntPtr cPtr = freeswitchPINVOKE.switch_hash_first(deprecate_me, SWIGTYPE_p_switch_hash.getCPtr(hash));\r
+ public static SWIGTYPE_p_HashElem switch_core_hash_first(string deprecate_me, SWIGTYPE_p_switch_hash hash) {\r
+ IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_first(deprecate_me, SWIGTYPE_p_switch_hash.getCPtr(hash));\r
SWIGTYPE_p_HashElem ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_HashElem(cPtr, false);\r
return ret;\r
}\r
\r
- public static SWIGTYPE_p_HashElem switch_hash_next(SWIGTYPE_p_HashElem hi) {\r
- IntPtr cPtr = freeswitchPINVOKE.switch_hash_next(SWIGTYPE_p_HashElem.getCPtr(hi));\r
+ public static SWIGTYPE_p_HashElem switch_core_hash_next(SWIGTYPE_p_HashElem hi) {\r
+ IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_next(SWIGTYPE_p_HashElem.getCPtr(hi));\r
SWIGTYPE_p_HashElem ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_HashElem(cPtr, false);\r
return ret;\r
}\r
\r
- public static void switch_hash_this(SWIGTYPE_p_HashElem hi, SWIGTYPE_p_p_void key, SWIGTYPE_p_switch_ssize_t klen, SWIGTYPE_p_p_void val) {\r
- freeswitchPINVOKE.switch_hash_this(SWIGTYPE_p_HashElem.getCPtr(hi), SWIGTYPE_p_p_void.getCPtr(key), SWIGTYPE_p_switch_ssize_t.getCPtr(klen), SWIGTYPE_p_p_void.getCPtr(val));\r
+ public static void switch_core_hash_this(SWIGTYPE_p_HashElem hi, SWIGTYPE_p_p_void key, SWIGTYPE_p_switch_ssize_t klen, SWIGTYPE_p_p_void val) {\r
+ freeswitchPINVOKE.switch_core_hash_this(SWIGTYPE_p_HashElem.getCPtr(hi), SWIGTYPE_p_p_void.getCPtr(key), SWIGTYPE_p_switch_ssize_t.getCPtr(klen), SWIGTYPE_p_p_void.getCPtr(val));\r
}\r
\r
public static switch_status_t switch_core_timer_init(switch_timer timer, string timer_name, int interval, int samples, SWIGTYPE_p_apr_pool_t pool) {\r
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_hash_this")]\r
public static extern void switch_core_hash_this(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);\r
\r
- [DllImport("mod_managed", EntryPoint="CSharp_switch_hash_first")]\r
- public static extern IntPtr switch_hash_first(string jarg1, HandleRef jarg2);\r
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_core_hash_first")]\r
+ public static extern IntPtr switch_core_hash_first(string jarg1, HandleRef jarg2);\r
\r
- [DllImport("mod_managed", EntryPoint="CSharp_switch_hash_next")]\r
- public static extern IntPtr switch_hash_next(HandleRef jarg1);\r
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_core_hash_next")]\r
+ public static extern IntPtr switch_core_hash_next(HandleRef jarg1);\r
\r
- [DllImport("mod_managed", EntryPoint="CSharp_switch_hash_this")]\r
- public static extern void switch_hash_this(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);\r
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_core_hash_this")]\r
+ public static extern void switch_core_hash_this(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);\r
\r
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_timer_init")]\r
public static extern int switch_core_timer_init(HandleRef jarg1, string jarg2, int jarg3, int jarg4, HandleRef jarg5);\r
return ret;
}
- public static switch_status_t switch_core_hash_init_case(SWIGTYPE_p_p_switch_hash hash, SWIGTYPE_p_apr_pool_t pool, switch_bool_t case_sensitive) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_init_case(SWIGTYPE_p_p_switch_hash.getCPtr(hash), SWIGTYPE_p_apr_pool_t.getCPtr(pool), (int)case_sensitive);
+ public static switch_status_t switch_core_hash_init_case(SWIGTYPE_p_p_switch_hashtable hash, switch_bool_t case_sensitive) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_init_case(SWIGTYPE_p_p_switch_hashtable.getCPtr(hash), (int)case_sensitive);
return ret;
}
- public static switch_status_t switch_core_hash_destroy(SWIGTYPE_p_p_switch_hash hash) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_destroy(SWIGTYPE_p_p_switch_hash.getCPtr(hash));
+ public static switch_status_t switch_core_hash_destroy(SWIGTYPE_p_p_switch_hashtable hash) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_destroy(SWIGTYPE_p_p_switch_hashtable.getCPtr(hash));
return ret;
}
- public static switch_status_t switch_core_hash_insert(SWIGTYPE_p_switch_hash hash, string key, SWIGTYPE_p_void data) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_insert(SWIGTYPE_p_switch_hash.getCPtr(hash), key, SWIGTYPE_p_void.getCPtr(data));
+ public static switch_status_t switch_core_hash_insert(SWIGTYPE_p_switch_hashtable hash, string key, SWIGTYPE_p_void data) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_insert(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key, SWIGTYPE_p_void.getCPtr(data));
return ret;
}
- public static switch_status_t switch_core_hash_insert_locked(SWIGTYPE_p_switch_hash hash, string key, SWIGTYPE_p_void data, SWIGTYPE_p_switch_mutex_t mutex) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_insert_locked(SWIGTYPE_p_switch_hash.getCPtr(hash), key, SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_switch_mutex_t.getCPtr(mutex));
+ public static switch_status_t switch_core_hash_insert_locked(SWIGTYPE_p_switch_hashtable hash, string key, SWIGTYPE_p_void data, SWIGTYPE_p_switch_mutex_t mutex) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_insert_locked(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key, SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_switch_mutex_t.getCPtr(mutex));
return ret;
}
- public static switch_status_t switch_core_hash_insert_wrlock(SWIGTYPE_p_switch_hash hash, string key, SWIGTYPE_p_void data, SWIGTYPE_p_switch_thread_rwlock_t rwlock) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_insert_wrlock(SWIGTYPE_p_switch_hash.getCPtr(hash), key, SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_switch_thread_rwlock_t.getCPtr(rwlock));
+ public static switch_status_t switch_core_hash_insert_wrlock(SWIGTYPE_p_switch_hashtable hash, string key, SWIGTYPE_p_void data, SWIGTYPE_p_switch_thread_rwlock_t rwlock) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_insert_wrlock(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key, SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_switch_thread_rwlock_t.getCPtr(rwlock));
return ret;
}
- public static switch_status_t switch_core_hash_delete(SWIGTYPE_p_switch_hash hash, string key) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_delete(SWIGTYPE_p_switch_hash.getCPtr(hash), key);
+ public static switch_status_t switch_core_hash_delete(SWIGTYPE_p_switch_hashtable hash, string key) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_delete(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key);
return ret;
}
- public static switch_status_t switch_core_hash_delete_locked(SWIGTYPE_p_switch_hash hash, string key, SWIGTYPE_p_switch_mutex_t mutex) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_delete_locked(SWIGTYPE_p_switch_hash.getCPtr(hash), key, SWIGTYPE_p_switch_mutex_t.getCPtr(mutex));
+ public static switch_status_t switch_core_hash_delete_locked(SWIGTYPE_p_switch_hashtable hash, string key, SWIGTYPE_p_switch_mutex_t mutex) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_delete_locked(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key, SWIGTYPE_p_switch_mutex_t.getCPtr(mutex));
return ret;
}
- public static switch_status_t switch_core_hash_delete_wrlock(SWIGTYPE_p_switch_hash hash, string key, SWIGTYPE_p_switch_thread_rwlock_t rwlock) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_delete_wrlock(SWIGTYPE_p_switch_hash.getCPtr(hash), key, SWIGTYPE_p_switch_thread_rwlock_t.getCPtr(rwlock));
+ public static switch_status_t switch_core_hash_delete_wrlock(SWIGTYPE_p_switch_hashtable hash, string key, SWIGTYPE_p_switch_thread_rwlock_t rwlock) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_delete_wrlock(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key, SWIGTYPE_p_switch_thread_rwlock_t.getCPtr(rwlock));
return ret;
}
- public static switch_status_t switch_core_hash_delete_multi(SWIGTYPE_p_switch_hash hash, SWIGTYPE_p_f_p_q_const__void_p_q_const__void_p_void__switch_bool_t callback, SWIGTYPE_p_void pData) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_delete_multi(SWIGTYPE_p_switch_hash.getCPtr(hash), SWIGTYPE_p_f_p_q_const__void_p_q_const__void_p_void__switch_bool_t.getCPtr(callback), SWIGTYPE_p_void.getCPtr(pData));
+ public static switch_status_t switch_core_hash_delete_multi(SWIGTYPE_p_switch_hashtable hash, SWIGTYPE_p_f_p_q_const__void_p_q_const__void_p_void__switch_bool_t callback, SWIGTYPE_p_void pData) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_hash_delete_multi(SWIGTYPE_p_switch_hashtable.getCPtr(hash), SWIGTYPE_p_f_p_q_const__void_p_q_const__void_p_void__switch_bool_t.getCPtr(callback), SWIGTYPE_p_void.getCPtr(pData));
return ret;
}
- public static SWIGTYPE_p_void switch_core_hash_find(SWIGTYPE_p_switch_hash hash, string key) {
- IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_find(SWIGTYPE_p_switch_hash.getCPtr(hash), key);
+ public static SWIGTYPE_p_void switch_core_hash_find(SWIGTYPE_p_switch_hashtable hash, string key) {
+ IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_find(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key);
SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
return ret;
}
- public static SWIGTYPE_p_void switch_core_hash_find_locked(SWIGTYPE_p_switch_hash hash, string key, SWIGTYPE_p_switch_mutex_t mutex) {
- IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_find_locked(SWIGTYPE_p_switch_hash.getCPtr(hash), key, SWIGTYPE_p_switch_mutex_t.getCPtr(mutex));
+ public static SWIGTYPE_p_void switch_core_hash_find_locked(SWIGTYPE_p_switch_hashtable hash, string key, SWIGTYPE_p_switch_mutex_t mutex) {
+ IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_find_locked(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key, SWIGTYPE_p_switch_mutex_t.getCPtr(mutex));
SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
return ret;
}
- public static SWIGTYPE_p_void switch_core_hash_find_rdlock(SWIGTYPE_p_switch_hash hash, string key, SWIGTYPE_p_switch_thread_rwlock_t rwlock) {
- IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_find_rdlock(SWIGTYPE_p_switch_hash.getCPtr(hash), key, SWIGTYPE_p_switch_thread_rwlock_t.getCPtr(rwlock));
+ public static SWIGTYPE_p_void switch_core_hash_find_rdlock(SWIGTYPE_p_switch_hashtable hash, string key, SWIGTYPE_p_switch_thread_rwlock_t rwlock) {
+ IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_find_rdlock(SWIGTYPE_p_switch_hashtable.getCPtr(hash), key, SWIGTYPE_p_switch_thread_rwlock_t.getCPtr(rwlock));
SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
return ret;
}
- public static SWIGTYPE_p_HashElem switch_core_hash_first(SWIGTYPE_p_switch_hash hash) {
- IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_first(SWIGTYPE_p_switch_hash.getCPtr(hash));
- SWIGTYPE_p_HashElem ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_HashElem(cPtr, false);
+ public static SWIGTYPE_p_switch_hashtable_iterator switch_core_hash_first(SWIGTYPE_p_switch_hashtable hash) {
+ IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_first(SWIGTYPE_p_switch_hashtable.getCPtr(hash));
+ SWIGTYPE_p_switch_hashtable_iterator ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_hashtable_iterator(cPtr, false);
return ret;
}
- public static SWIGTYPE_p_HashElem switch_core_hash_next(SWIGTYPE_p_HashElem hi) {
- IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_next(SWIGTYPE_p_HashElem.getCPtr(hi));
- SWIGTYPE_p_HashElem ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_HashElem(cPtr, false);
+ public static SWIGTYPE_p_switch_hashtable_iterator switch_core_hash_next(SWIGTYPE_p_switch_hashtable_iterator hi) {
+ IntPtr cPtr = freeswitchPINVOKE.switch_core_hash_next(SWIGTYPE_p_switch_hashtable_iterator.getCPtr(hi));
+ SWIGTYPE_p_switch_hashtable_iterator ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_hashtable_iterator(cPtr, false);
return ret;
}
- public static void switch_core_hash_this(SWIGTYPE_p_HashElem hi, SWIGTYPE_p_p_void key, SWIGTYPE_p_switch_ssize_t klen, SWIGTYPE_p_p_void val) {
- freeswitchPINVOKE.switch_core_hash_this(SWIGTYPE_p_HashElem.getCPtr(hi), SWIGTYPE_p_p_void.getCPtr(key), SWIGTYPE_p_switch_ssize_t.getCPtr(klen), SWIGTYPE_p_p_void.getCPtr(val));
- }
-
- public static SWIGTYPE_p_HashElem switch_hash_first(string deprecate_me, SWIGTYPE_p_switch_hash hash) {
- IntPtr cPtr = freeswitchPINVOKE.switch_hash_first(deprecate_me, SWIGTYPE_p_switch_hash.getCPtr(hash));
- SWIGTYPE_p_HashElem ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_HashElem(cPtr, false);
- return ret;
- }
-
- public static SWIGTYPE_p_HashElem switch_hash_next(SWIGTYPE_p_HashElem hi) {
- IntPtr cPtr = freeswitchPINVOKE.switch_hash_next(SWIGTYPE_p_HashElem.getCPtr(hi));
- SWIGTYPE_p_HashElem ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_HashElem(cPtr, false);
- return ret;
- }
-
- public static void switch_hash_this(SWIGTYPE_p_HashElem hi, SWIGTYPE_p_p_void key, SWIGTYPE_p_switch_ssize_t klen, SWIGTYPE_p_p_void val) {
- freeswitchPINVOKE.switch_hash_this(SWIGTYPE_p_HashElem.getCPtr(hi), SWIGTYPE_p_p_void.getCPtr(key), SWIGTYPE_p_switch_ssize_t.getCPtr(klen), SWIGTYPE_p_p_void.getCPtr(val));
+ public static void switch_core_hash_this(SWIGTYPE_p_switch_hashtable_iterator hi, SWIGTYPE_p_p_void key, SWIGTYPE_p_switch_ssize_t klen, SWIGTYPE_p_p_void val) {
+ freeswitchPINVOKE.switch_core_hash_this(SWIGTYPE_p_switch_hashtable_iterator.getCPtr(hi), SWIGTYPE_p_p_void.getCPtr(key), SWIGTYPE_p_switch_ssize_t.getCPtr(klen), SWIGTYPE_p_p_void.getCPtr(val));
}
public static switch_status_t switch_core_timer_init(switch_timer timer, string timer_name, int interval, int samples, SWIGTYPE_p_apr_pool_t pool) {
return ret;
}
- public static SWIGTYPE_p_HashElem switch_core_mime_index() {
+ public static SWIGTYPE_p_switch_hashtable_iterator switch_core_mime_index() {
IntPtr cPtr = freeswitchPINVOKE.switch_core_mime_index();
- SWIGTYPE_p_HashElem ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_HashElem(cPtr, false);
+ SWIGTYPE_p_switch_hashtable_iterator ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_hashtable_iterator(cPtr, false);
return ret;
}
freeswitchPINVOKE.switch_event_deliver(SWIGTYPE_p_p_switch_event.getCPtr(arg0));
}
- public static string switch_event_build_param_string(switch_event arg0, string prefix, SWIGTYPE_p_switch_hash vars_map) {
- string ret = freeswitchPINVOKE.switch_event_build_param_string(switch_event.getCPtr(arg0), prefix, SWIGTYPE_p_switch_hash.getCPtr(vars_map));
+ public static string switch_event_build_param_string(switch_event arg0, string prefix, SWIGTYPE_p_switch_hashtable vars_map) {
+ string ret = freeswitchPINVOKE.switch_event_build_param_string(switch_event.getCPtr(arg0), prefix, SWIGTYPE_p_switch_hashtable.getCPtr(vars_map));
return ret;
}
freeswitchPINVOKE.switch_rtp_destroy(SWIGTYPE_p_p_switch_rtp.getCPtr(rtp_session));
}
- public static switch_status_t switch_rtp_activate_ice(SWIGTYPE_p_switch_rtp rtp_session, string login, string rlogin, string password, string rpassword, ice_proto_t proto, SWIGTYPE_p_switch_core_media_ice_type_t type, ice_t ice_params) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_activate_ice(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), login, rlogin, password, rpassword, (int)proto, SWIGTYPE_p_switch_core_media_ice_type_t.getCPtr(type), ice_t.getCPtr(ice_params));
- if (freeswitchPINVOKE.SWIGPendingException.Pending) throw freeswitchPINVOKE.SWIGPendingException.Retrieve();
+ public static switch_status_t switch_rtp_activate_ice(SWIGTYPE_p_switch_rtp rtp_session, string login, string rlogin, string password, string rpassword, ice_proto_t proto, switch_core_media_ice_type_t type, ice_t ice_params) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_activate_ice(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), login, rlogin, password, rpassword, (int)proto, (int)type, ice_t.getCPtr(ice_params));
return ret;
}
return ret;
}
- public static switch_status_t switch_rtp_set_payload_map(SWIGTYPE_p_switch_rtp rtp_session, SWIGTYPE_p_p_payload_map_t pmap) {
- switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_set_payload_map(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), SWIGTYPE_p_p_payload_map_t.getCPtr(pmap));
+ public static switch_status_t switch_rtp_set_payload_map(SWIGTYPE_p_switch_rtp rtp_session, SWIGTYPE_p_p_payload_map_s pmap) {
+ switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_rtp_set_payload_map(SWIGTYPE_p_switch_rtp.getCPtr(rtp_session), SWIGTYPE_p_p_payload_map_s.getCPtr(pmap));
return ret;
}
public static readonly int SWITCH_RTCP_MAX_BUF_LEN = freeswitchPINVOKE.SWITCH_RTCP_MAX_BUF_LEN_get();
public static readonly int SWITCH_RTP_MAX_BUF_LEN_WORDS = freeswitchPINVOKE.SWITCH_RTP_MAX_BUF_LEN_WORDS_get();
public static readonly int SWITCH_RTP_MAX_CRYPTO_LEN = freeswitchPINVOKE.SWITCH_RTP_MAX_CRYPTO_LEN_get();
- public static readonly int SWITCH_RTP_KEY_LEN = freeswitchPINVOKE.SWITCH_RTP_KEY_LEN_get();
- public static readonly string SWITCH_RTP_CRYPTO_KEY_32 = freeswitchPINVOKE.SWITCH_RTP_CRYPTO_KEY_32_get();
public static readonly string SWITCH_RTP_CRYPTO_KEY_80 = freeswitchPINVOKE.SWITCH_RTP_CRYPTO_KEY_80_get();
public static readonly int MAX_CAND = freeswitchPINVOKE.MAX_CAND_get();
public static readonly int SWITCH_XML_BUFSIZE = freeswitchPINVOKE.SWITCH_XML_BUFSIZE_get();
[DllImport("mod_managed", EntryPoint="CSharp_delete_switch_loadable_module_function_table_t")]
public static extern void delete_switch_loadable_module_function_table_t(HandleRef jarg1);
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_type_set")]
+ public static extern void payload_map_t_type_set(HandleRef jarg1, int jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_type_get")]
+ public static extern int payload_map_t_type_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_sdp_type_set")]
+ public static extern void payload_map_t_sdp_type_set(HandleRef jarg1, int jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_sdp_type_get")]
+ public static extern int payload_map_t_sdp_type_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_ptime_set")]
+ public static extern void payload_map_t_ptime_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_ptime_get")]
+ public static extern uint payload_map_t_ptime_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_rate_set")]
+ public static extern void payload_map_t_rate_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_rate_get")]
+ public static extern uint payload_map_t_rate_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_allocated_set")]
+ public static extern void payload_map_t_allocated_set(HandleRef jarg1, byte jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_allocated_get")]
+ public static extern byte payload_map_t_allocated_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_negotiated_set")]
+ public static extern void payload_map_t_negotiated_set(HandleRef jarg1, byte jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_negotiated_get")]
+ public static extern byte payload_map_t_negotiated_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_current_set")]
+ public static extern void payload_map_t_current_set(HandleRef jarg1, byte jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_current_get")]
+ public static extern byte payload_map_t_current_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_hash_set")]
+ public static extern void payload_map_t_hash_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_hash_get")]
+ public static extern uint payload_map_t_hash_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_rm_encoding_set")]
+ public static extern void payload_map_t_rm_encoding_set(HandleRef jarg1, string jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_rm_encoding_get")]
+ public static extern string payload_map_t_rm_encoding_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_iananame_set")]
+ public static extern void payload_map_t_iananame_set(HandleRef jarg1, string jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_iananame_get")]
+ public static extern string payload_map_t_iananame_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_pt_set")]
+ public static extern void payload_map_t_pt_set(HandleRef jarg1, byte jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_pt_get")]
+ public static extern byte payload_map_t_pt_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_rm_rate_set")]
+ public static extern void payload_map_t_rm_rate_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_rm_rate_get")]
+ public static extern uint payload_map_t_rm_rate_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_adv_rm_rate_set")]
+ public static extern void payload_map_t_adv_rm_rate_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_adv_rm_rate_get")]
+ public static extern uint payload_map_t_adv_rm_rate_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_codec_ms_set")]
+ public static extern void payload_map_t_codec_ms_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_codec_ms_get")]
+ public static extern uint payload_map_t_codec_ms_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_bitrate_set")]
+ public static extern void payload_map_t_bitrate_set(HandleRef jarg1, uint jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_bitrate_get")]
+ public static extern uint payload_map_t_bitrate_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_rm_fmtp_set")]
+ public static extern void payload_map_t_rm_fmtp_set(HandleRef jarg1, string jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_rm_fmtp_get")]
+ public static extern string payload_map_t_rm_fmtp_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_agreed_pt_set")]
+ public static extern void payload_map_t_agreed_pt_set(HandleRef jarg1, byte jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_agreed_pt_get")]
+ public static extern byte payload_map_t_agreed_pt_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_recv_pt_set")]
+ public static extern void payload_map_t_recv_pt_set(HandleRef jarg1, byte jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_recv_pt_get")]
+ public static extern byte payload_map_t_recv_pt_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_fmtp_out_set")]
+ public static extern void payload_map_t_fmtp_out_set(HandleRef jarg1, string jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_fmtp_out_get")]
+ public static extern string payload_map_t_fmtp_out_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_remote_sdp_ip_set")]
+ public static extern void payload_map_t_remote_sdp_ip_set(HandleRef jarg1, string jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_remote_sdp_ip_get")]
+ public static extern string payload_map_t_remote_sdp_ip_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_remote_sdp_port_set")]
+ public static extern void payload_map_t_remote_sdp_port_set(HandleRef jarg1, ushort jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_remote_sdp_port_get")]
+ public static extern ushort payload_map_t_remote_sdp_port_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_channels_set")]
+ public static extern void payload_map_t_channels_set(HandleRef jarg1, int jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_channels_get")]
+ public static extern int payload_map_t_channels_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_adv_channels_set")]
+ public static extern void payload_map_t_adv_channels_set(HandleRef jarg1, int jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_adv_channels_get")]
+ public static extern int payload_map_t_adv_channels_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_next_set")]
+ public static extern void payload_map_t_next_set(HandleRef jarg1, HandleRef jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_payload_map_t_next_get")]
+ public static extern IntPtr payload_map_t_next_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_new_payload_map_t")]
+ public static extern IntPtr new_payload_map_t();
+
+ [DllImport("mod_managed", EntryPoint="CSharp_delete_payload_map_t")]
+ public static extern void delete_payload_map_t(HandleRef jarg1);
+
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_db_close")]
public static extern int switch_core_db_close(HandleRef jarg1);
public static extern int switch_core_session_recv_dtmf(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_hash_init_case")]
- public static extern int switch_core_hash_init_case(HandleRef jarg1, HandleRef jarg2, int jarg3);
+ public static extern int switch_core_hash_init_case(HandleRef jarg1, int jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_hash_destroy")]
public static extern int switch_core_hash_destroy(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_hash_this")]
public static extern void switch_core_hash_this(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);
- [DllImport("mod_managed", EntryPoint="CSharp_switch_hash_first")]
- public static extern IntPtr switch_hash_first(string jarg1, HandleRef jarg2);
-
- [DllImport("mod_managed", EntryPoint="CSharp_switch_hash_next")]
- public static extern IntPtr switch_hash_next(HandleRef jarg1);
-
- [DllImport("mod_managed", EntryPoint="CSharp_switch_hash_this")]
- public static extern void switch_hash_this(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, HandleRef jarg4);
-
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_timer_init")]
public static extern int switch_core_timer_init(HandleRef jarg1, string jarg2, int jarg3, int jarg4, HandleRef jarg5);
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_MAX_CRYPTO_LEN_get")]
public static extern int SWITCH_RTP_MAX_CRYPTO_LEN_get();
- [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_KEY_LEN_get")]
- public static extern int SWITCH_RTP_KEY_LEN_get();
-
- [DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_CRYPTO_KEY_32_get")]
- public static extern string SWITCH_RTP_CRYPTO_KEY_32_get();
-
[DllImport("mod_managed", EntryPoint="CSharp_SWITCH_RTP_CRYPTO_KEY_80_get")]
public static extern string SWITCH_RTP_CRYPTO_KEY_80_get();
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_srtp_crypto_suite_t_name_set")]
+ public static extern void switch_srtp_crypto_suite_t_name_set(HandleRef jarg1, string jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_srtp_crypto_suite_t_name_get")]
+ public static extern string switch_srtp_crypto_suite_t_name_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_srtp_crypto_suite_t_type_set")]
+ public static extern void switch_srtp_crypto_suite_t_type_set(HandleRef jarg1, int jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_srtp_crypto_suite_t_type_get")]
+ public static extern int switch_srtp_crypto_suite_t_type_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_srtp_crypto_suite_t_keylen_set")]
+ public static extern void switch_srtp_crypto_suite_t_keylen_set(HandleRef jarg1, int jarg2);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_switch_srtp_crypto_suite_t_keylen_get")]
+ public static extern int switch_srtp_crypto_suite_t_keylen_get(HandleRef jarg1);
+
+ [DllImport("mod_managed", EntryPoint="CSharp_new_switch_srtp_crypto_suite_t")]
+ public static extern IntPtr new_switch_srtp_crypto_suite_t();
+
+ [DllImport("mod_managed", EntryPoint="CSharp_delete_switch_srtp_crypto_suite_t")]
+ public static extern void delete_switch_srtp_crypto_suite_t(HandleRef jarg1);
+
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_crypto_key_index_set")]
public static extern void switch_rtp_crypto_key_index_set(HandleRef jarg1, uint jarg2);
public static extern void switch_rtp_destroy(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_activate_ice")]
- public static extern int switch_rtp_activate_ice(HandleRef jarg1, string jarg2, string jarg3, string jarg4, string jarg5, int jarg6, HandleRef jarg7, HandleRef jarg8);
+ public static extern int switch_rtp_activate_ice(HandleRef jarg1, string jarg2, string jarg3, string jarg4, string jarg5, int jarg6, int jarg7, HandleRef jarg8);
[DllImport("mod_managed", EntryPoint="CSharp_switch_rtp_activate_rtcp")]
public static extern int switch_rtp_activate_rtcp(HandleRef jarg1, int jarg2, ushort jarg3, int jarg4);
using System;
using System.Runtime.InteropServices;
+public class payload_map_t : IDisposable {
+ private HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal payload_map_t(IntPtr cPtr, bool cMemoryOwn) {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new HandleRef(this, cPtr);
+ }
+
+ internal static HandleRef getCPtr(payload_map_t obj) {
+ return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ ~payload_map_t() {
+ Dispose();
+ }
+
+ public virtual void Dispose() {
+ lock(this) {
+ if (swigCPtr.Handle != IntPtr.Zero) {
+ if (swigCMemOwn) {
+ swigCMemOwn = false;
+ freeswitchPINVOKE.delete_payload_map_t(swigCPtr);
+ }
+ swigCPtr = new HandleRef(null, IntPtr.Zero);
+ }
+ GC.SuppressFinalize(this);
+ }
+ }
+
+ public switch_media_type_t type {
+ set {
+ freeswitchPINVOKE.payload_map_t_type_set(swigCPtr, (int)value);
+ }
+ get {
+ switch_media_type_t ret = (switch_media_type_t)freeswitchPINVOKE.payload_map_t_type_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public switch_sdp_type_t sdp_type {
+ set {
+ freeswitchPINVOKE.payload_map_t_sdp_type_set(swigCPtr, (int)value);
+ }
+ get {
+ switch_sdp_type_t ret = (switch_sdp_type_t)freeswitchPINVOKE.payload_map_t_sdp_type_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public uint ptime {
+ set {
+ freeswitchPINVOKE.payload_map_t_ptime_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.payload_map_t_ptime_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public uint rate {
+ set {
+ freeswitchPINVOKE.payload_map_t_rate_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.payload_map_t_rate_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public byte allocated {
+ set {
+ freeswitchPINVOKE.payload_map_t_allocated_set(swigCPtr, value);
+ }
+ get {
+ byte ret = freeswitchPINVOKE.payload_map_t_allocated_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public byte negotiated {
+ set {
+ freeswitchPINVOKE.payload_map_t_negotiated_set(swigCPtr, value);
+ }
+ get {
+ byte ret = freeswitchPINVOKE.payload_map_t_negotiated_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public byte current {
+ set {
+ freeswitchPINVOKE.payload_map_t_current_set(swigCPtr, value);
+ }
+ get {
+ byte ret = freeswitchPINVOKE.payload_map_t_current_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public uint hash {
+ set {
+ freeswitchPINVOKE.payload_map_t_hash_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.payload_map_t_hash_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public string rm_encoding {
+ set {
+ freeswitchPINVOKE.payload_map_t_rm_encoding_set(swigCPtr, value);
+ }
+ get {
+ string ret = freeswitchPINVOKE.payload_map_t_rm_encoding_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public string iananame {
+ set {
+ freeswitchPINVOKE.payload_map_t_iananame_set(swigCPtr, value);
+ }
+ get {
+ string ret = freeswitchPINVOKE.payload_map_t_iananame_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public byte pt {
+ set {
+ freeswitchPINVOKE.payload_map_t_pt_set(swigCPtr, value);
+ }
+ get {
+ byte ret = freeswitchPINVOKE.payload_map_t_pt_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public uint rm_rate {
+ set {
+ freeswitchPINVOKE.payload_map_t_rm_rate_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.payload_map_t_rm_rate_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public uint adv_rm_rate {
+ set {
+ freeswitchPINVOKE.payload_map_t_adv_rm_rate_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.payload_map_t_adv_rm_rate_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public uint codec_ms {
+ set {
+ freeswitchPINVOKE.payload_map_t_codec_ms_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.payload_map_t_codec_ms_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public uint bitrate {
+ set {
+ freeswitchPINVOKE.payload_map_t_bitrate_set(swigCPtr, value);
+ }
+ get {
+ uint ret = freeswitchPINVOKE.payload_map_t_bitrate_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public string rm_fmtp {
+ set {
+ freeswitchPINVOKE.payload_map_t_rm_fmtp_set(swigCPtr, value);
+ }
+ get {
+ string ret = freeswitchPINVOKE.payload_map_t_rm_fmtp_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public byte agreed_pt {
+ set {
+ freeswitchPINVOKE.payload_map_t_agreed_pt_set(swigCPtr, value);
+ }
+ get {
+ byte ret = freeswitchPINVOKE.payload_map_t_agreed_pt_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public byte recv_pt {
+ set {
+ freeswitchPINVOKE.payload_map_t_recv_pt_set(swigCPtr, value);
+ }
+ get {
+ byte ret = freeswitchPINVOKE.payload_map_t_recv_pt_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public string fmtp_out {
+ set {
+ freeswitchPINVOKE.payload_map_t_fmtp_out_set(swigCPtr, value);
+ }
+ get {
+ string ret = freeswitchPINVOKE.payload_map_t_fmtp_out_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public string remote_sdp_ip {
+ set {
+ freeswitchPINVOKE.payload_map_t_remote_sdp_ip_set(swigCPtr, value);
+ }
+ get {
+ string ret = freeswitchPINVOKE.payload_map_t_remote_sdp_ip_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public ushort remote_sdp_port {
+ set {
+ freeswitchPINVOKE.payload_map_t_remote_sdp_port_set(swigCPtr, value);
+ }
+ get {
+ ushort ret = freeswitchPINVOKE.payload_map_t_remote_sdp_port_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public int channels {
+ set {
+ freeswitchPINVOKE.payload_map_t_channels_set(swigCPtr, value);
+ }
+ get {
+ int ret = freeswitchPINVOKE.payload_map_t_channels_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public int adv_channels {
+ set {
+ freeswitchPINVOKE.payload_map_t_adv_channels_set(swigCPtr, value);
+ }
+ get {
+ int ret = freeswitchPINVOKE.payload_map_t_adv_channels_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public payload_map_t next {
+ set {
+ freeswitchPINVOKE.payload_map_t_next_set(swigCPtr, payload_map_t.getCPtr(value));
+ }
+ get {
+ IntPtr cPtr = freeswitchPINVOKE.payload_map_t_next_get(swigCPtr);
+ payload_map_t ret = (cPtr == IntPtr.Zero) ? null : new payload_map_t(cPtr, false);
+ return ret;
+ }
+ }
+
+ public payload_map_t() : this(freeswitchPINVOKE.new_payload_map_t(), true) {
+ }
+
+}
+
+}
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+namespace FreeSWITCH.Native {
+
+using System;
+using System.Runtime.InteropServices;
+
public class profile_node_t : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_HashElem {
- private HandleRef swigCPtr;
-
- internal SWIGTYPE_p_HashElem(IntPtr cPtr, bool futureUse) {
- swigCPtr = new HandleRef(this, cPtr);
- }
-
- protected SWIGTYPE_p_HashElem() {
- swigCPtr = new HandleRef(null, IntPtr.Zero);
- }
-
- internal static HandleRef getCPtr(SWIGTYPE_p_HashElem obj) {
- return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
- }
-}
-
-}
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.7
- *
- * Do not make changes to this file unless you know what you are doing--modify
- * the SWIG interface file instead.
- * ----------------------------------------------------------------------------- */
-
-namespace FreeSWITCH.Native {
-
-using System;
-using System.Runtime.InteropServices;
-
public class SWIGTYPE_p_in6_addr {
private HandleRef swigCPtr;
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_payload_map_t {
- private HandleRef swigCPtr;
-
- internal SWIGTYPE_p_payload_map_t(IntPtr cPtr, bool futureUse) {
- swigCPtr = new HandleRef(this, cPtr);
- }
-
- protected SWIGTYPE_p_payload_map_t() {
- swigCPtr = new HandleRef(null, IntPtr.Zero);
- }
-
- internal static HandleRef getCPtr(SWIGTYPE_p_payload_map_t obj) {
- return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
- }
-}
-
-}
-/* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.7
- *
- * Do not make changes to this file unless you know what you are doing--modify
- * the SWIG interface file instead.
- * ----------------------------------------------------------------------------- */
-
-namespace FreeSWITCH.Native {
-
-using System;
-using System.Runtime.InteropServices;
-
public class SWIGTYPE_p_p_char {
private HandleRef swigCPtr;
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_p_payload_map_t {
+public class SWIGTYPE_p_p_payload_map_s {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_p_payload_map_t(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_p_payload_map_s(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_p_payload_map_t() {
+ protected SWIGTYPE_p_p_payload_map_s() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_p_payload_map_t obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_p_payload_map_s obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_p_switch_hash {
+public class SWIGTYPE_p_p_switch_hashtable {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_p_switch_hash(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_p_switch_hashtable(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_p_switch_hash() {
+ protected SWIGTYPE_p_p_switch_hashtable() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_p_switch_hash obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_p_switch_hashtable obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_switch_core_media_ice_type_t {
+public class SWIGTYPE_p_switch_core_port_allocator {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_switch_core_media_ice_type_t(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_switch_core_port_allocator(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_switch_core_media_ice_type_t() {
+ protected SWIGTYPE_p_switch_core_port_allocator() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_switch_core_media_ice_type_t obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_switch_core_port_allocator obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_switch_core_port_allocator {
+public class SWIGTYPE_p_switch_core_session {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_switch_core_port_allocator(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_switch_core_session(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_switch_core_port_allocator() {
+ protected SWIGTYPE_p_switch_core_session() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_switch_core_port_allocator obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_switch_core_session obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_switch_core_session {
+public class SWIGTYPE_p_switch_event_types_t {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_switch_core_session(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_switch_event_types_t(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_switch_core_session() {
+ protected SWIGTYPE_p_switch_event_types_t() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_switch_core_session obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_switch_event_types_t obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_switch_event_types_t {
+public class SWIGTYPE_p_switch_file_t {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_switch_event_types_t(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_switch_file_t(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_switch_event_types_t() {
+ protected SWIGTYPE_p_switch_file_t() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_switch_event_types_t obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_switch_file_t obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_switch_file_t {
+public class SWIGTYPE_p_switch_hashtable {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_switch_file_t(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_switch_hashtable(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_switch_file_t() {
+ protected SWIGTYPE_p_switch_hashtable() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_switch_file_t obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_switch_hashtable obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
using System;
using System.Runtime.InteropServices;
-public class SWIGTYPE_p_switch_hash {
+public class SWIGTYPE_p_switch_hashtable_iterator {
private HandleRef swigCPtr;
- internal SWIGTYPE_p_switch_hash(IntPtr cPtr, bool futureUse) {
+ internal SWIGTYPE_p_switch_hashtable_iterator(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
- protected SWIGTYPE_p_switch_hash() {
+ protected SWIGTYPE_p_switch_hashtable_iterator() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
- internal static HandleRef getCPtr(SWIGTYPE_p_switch_hash obj) {
+ internal static HandleRef getCPtr(SWIGTYPE_p_switch_hashtable_iterator obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
CF_AUDIO_PAUSE,
CF_VIDEO_PAUSE,
CF_BYPASS_MEDIA_AFTER_HOLD,
+ CF_HANGUP_HELD,
+ CF_CONFERENCE_RESET_MEDIA,
CF_FLAG_MAX
}
namespace FreeSWITCH.Native {
+public enum switch_core_media_ice_type_t {
+ ICE_GOOGLE_JINGLE = (1 << 0),
+ ICE_VANILLA = (1 << 1),
+ ICE_CONTROLLED = (1 << 2)
+}
+
+}
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+namespace FreeSWITCH.Native {
+
using System;
using System.Runtime.InteropServices;
SWITCH_MESSAGE_ANSWER_EVENT,
SWITCH_MESSAGE_PROGRESS_EVENT,
SWITCH_MESSAGE_RING_EVENT,
+ SWITCH_MESSAGE_RESAMPLE_EVENT,
SWITCH_MESSAGE_INVALID
}
}
}
- public SWIGTYPE_p_payload_map_t pmap {
+ public payload_map_t pmap {
set {
- freeswitchPINVOKE.switch_frame_pmap_set(swigCPtr, SWIGTYPE_p_payload_map_t.getCPtr(value));
+ freeswitchPINVOKE.switch_frame_pmap_set(swigCPtr, payload_map_t.getCPtr(value));
}
get {
IntPtr cPtr = freeswitchPINVOKE.switch_frame_pmap_get(swigCPtr);
- SWIGTYPE_p_payload_map_t ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_payload_map_t(cPtr, false);
+ payload_map_t ret = (cPtr == IntPtr.Zero) ? null : new payload_map_t(cPtr, false);
return ret;
}
}
namespace FreeSWITCH.Native {
public enum switch_rtp_crypto_key_type_t {
- NO_CRYPTO,
+ AEAD_AES_256_GCM_8,
+ AEAD_AES_128_GCM_8,
+ AES_CM_256_HMAC_SHA1_80,
+ AES_CM_192_HMAC_SHA1_80,
AES_CM_128_HMAC_SHA1_80,
+ AES_CM_256_HMAC_SHA1_32,
+ AES_CM_192_HMAC_SHA1_32,
AES_CM_128_HMAC_SHA1_32,
- AES_CM_256_HMAC_SHA1_80,
- AES_CM_128_NULL_AUTH
+ AES_CM_128_NULL_AUTH,
+ CRYPTO_INVALID
}
}
SWITCH_RTP_FLAG_PAUSE,
SWITCH_RTP_FLAG_FIR,
SWITCH_RTP_FLAG_PLI,
+ SWITCH_RTP_FLAG_RESET,
SWITCH_RTP_FLAG_INVALID
}
namespace FreeSWITCH.Native {
+public enum switch_sdp_type_t {
+ SDP_TYPE_REQUEST,
+ SDP_TYPE_RESPONSE
+}
+
+}
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+namespace FreeSWITCH.Native {
+
using System;
using System.Runtime.InteropServices;
namespace FreeSWITCH.Native {
+using System;
+using System.Runtime.InteropServices;
+
+public class switch_srtp_crypto_suite_t : IDisposable {
+ private HandleRef swigCPtr;
+ protected bool swigCMemOwn;
+
+ internal switch_srtp_crypto_suite_t(IntPtr cPtr, bool cMemoryOwn) {
+ swigCMemOwn = cMemoryOwn;
+ swigCPtr = new HandleRef(this, cPtr);
+ }
+
+ internal static HandleRef getCPtr(switch_srtp_crypto_suite_t obj) {
+ return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+ }
+
+ ~switch_srtp_crypto_suite_t() {
+ Dispose();
+ }
+
+ public virtual void Dispose() {
+ lock(this) {
+ if (swigCPtr.Handle != IntPtr.Zero) {
+ if (swigCMemOwn) {
+ swigCMemOwn = false;
+ freeswitchPINVOKE.delete_switch_srtp_crypto_suite_t(swigCPtr);
+ }
+ swigCPtr = new HandleRef(null, IntPtr.Zero);
+ }
+ GC.SuppressFinalize(this);
+ }
+ }
+
+ public string name {
+ set {
+ freeswitchPINVOKE.switch_srtp_crypto_suite_t_name_set(swigCPtr, value);
+ }
+ get {
+ string ret = freeswitchPINVOKE.switch_srtp_crypto_suite_t_name_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public switch_rtp_crypto_key_type_t type {
+ set {
+ freeswitchPINVOKE.switch_srtp_crypto_suite_t_type_set(swigCPtr, (int)value);
+ }
+ get {
+ switch_rtp_crypto_key_type_t ret = (switch_rtp_crypto_key_type_t)freeswitchPINVOKE.switch_srtp_crypto_suite_t_type_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public int keylen {
+ set {
+ freeswitchPINVOKE.switch_srtp_crypto_suite_t_keylen_set(swigCPtr, value);
+ }
+ get {
+ int ret = freeswitchPINVOKE.switch_srtp_crypto_suite_t_keylen_get(swigCPtr);
+ return ret;
+ }
+ }
+
+ public switch_srtp_crypto_suite_t() : this(freeswitchPINVOKE.new_switch_srtp_crypto_suite_t(), true) {
+ }
+
+}
+
+}
+/* ----------------------------------------------------------------------------
+ * This file was automatically generated by SWIG (http://www.swig.org).
+ * Version 2.0.7
+ *
+ * Do not make changes to this file unless you know what you are doing--modify
+ * the SWIG interface file instead.
+ * ----------------------------------------------------------------------------- */
+
+namespace FreeSWITCH.Native {
+
public enum switch_stack_t {
SWITCH_STACK_BOTTOM = (1 << 0),
SWITCH_STACK_TOP = (1 << 1),
memset(&module_manager, 0, sizeof(module_manager));
switch_core_new_memory_pool(&module_manager.pool);
- switch_core_hash_init(&module_manager.mod_hash, module_manager.pool);
- switch_core_hash_init(&module_manager.load_hash, module_manager.pool);
+ switch_core_hash_init(&module_manager.mod_hash);
+ switch_core_hash_init(&module_manager.load_hash);
if ((xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_xml_t mods, ld;
switch_core_new_memory_pool(&module_manager.pool);
- switch_core_hash_init(&module_manager.load_hash, module_manager.pool);
+ switch_core_hash_init(&module_manager.load_hash);
if ((xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
switch_xml_t mods, ld;
}
switch_mutex_init(&_mutex, SWITCH_MUTEX_NESTED, _pool);
- switch_core_hash_init(&_event_hash, _pool);
+ switch_core_hash_init(&_event_hash);
switch_queue_create(&_event_queue, MAX_QUEUE_LEN, _pool);
_filters = NULL;
{
/* Create hash and pool - for the root object only */
if (switch_core_new_memory_pool(&_pool) == SWITCH_STATUS_SUCCESS && _pool) {
- if (switch_core_hash_init(&_obj_hash, _pool) != SWITCH_STATUS_SUCCESS) {
+ if (switch_core_hash_init(&_obj_hash) != SWITCH_STATUS_SUCCESS) {
switch_core_destroy_memory_pool(&_pool);
_obj_hash = NULL;
_pool = NULL;
}
/* First destroy all objects in the hash */
- for (hi = switch_hash_first(NULL, tmp); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( tmp); hi; hi = switch_core_hash_next(hi)) {
const void *var = NULL;
void *val = NULL;
FSXML *obj;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
if (val) {
obj = static_cast<FSXML *>(val);
switch_core_hash_destroy(&log_hash);
}
- switch_core_hash_init(&log_hash, module_pool);
+ switch_core_hash_init(&log_hash);
if ((settings = switch_xml_child(cfg, "mappings"))) {
for (param = switch_xml_child(settings, "param"); param; param = param->next) {
const void *var;
logfile_profile_t *profile;
- for (hi = switch_hash_first(NULL, profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( profile_hash); hi; hi = switch_core_hash_next(hi)) {
size_t mask = 0;
size_t ok = 0;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
profile = val;
ok = switch_log_check_mask(profile->all_level, level);
new_profile = switch_core_alloc(module_pool, sizeof(*new_profile));
memset(new_profile, 0, sizeof(*new_profile));
- switch_core_hash_init(&(new_profile->log_hash), module_pool);
+ switch_core_hash_init(&(new_profile->log_hash));
new_profile->name = switch_core_strdup(module_pool, switch_str_nil(name));
new_profile->suffix = 1;
if (sig && !strcmp(sig, "HUP")) {
if (globals.rotate) {
- for (hi = switch_hash_first(NULL, profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
profile = val;
mod_logfile_rotate(profile);
}
} else {
switch_mutex_lock(globals.mutex);
- for (hi = switch_hash_first(NULL, profile_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( profile_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
profile = val;
switch_file_close(profile->log_afd);
if (mod_logfile_openlogfile(profile, SWITCH_TRUE) != SWITCH_STATUS_SUCCESS) {
if (profile_hash) {
switch_core_hash_destroy(&profile_hash);
}
- switch_core_hash_init(&profile_hash, module_pool);
+ switch_core_hash_init(&profile_hash);
if (switch_event_bind_removable(modname, SWITCH_EVENT_TRAP, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL, &globals.node) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
switch_log_unbind_logger(mod_logfile_logger);
switch_event_unbind(&globals.node);
- for (hi = switch_hash_first(NULL, profile_hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( profile_hash); hi; hi = switch_core_hash_next(hi)) {
logfile_profile_t *profile;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (logfile_profile_t *) val)) {
switch_file_close(profile->log_afd);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Closing %s\n", profile->logfile);
use_dynamic_url = 1;
} else if (!strcasecmp(var, "enable-post-var")) {
if (!vars_map && need_vars_map == 0) {
- if (switch_core_hash_init(&vars_map, globals.pool) != SWITCH_STATUS_SUCCESS) {
+ if (switch_core_hash_init(&vars_map) != SWITCH_STATUS_SUCCESS) {
need_vars_map = -1;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't init params hash!\n");
continue;
MIMETypeInit();
- for (hi = switch_core_mime_index(); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_mime_index(); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if (var && val) {
MIMETypeAdd((char *) val, (char *) var);
}
}
} else if (!strcasecmp(var, "enable-post-var")) {
if (!vars_map && need_vars_map == 0) {
- if (switch_core_hash_init(&vars_map, globals.pool) != SWITCH_STATUS_SUCCESS) {
+ if (switch_core_hash_init(&vars_map) != SWITCH_STATUS_SUCCESS) {
need_vars_map = -1;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't init params hash!\n");
continue;
switch_event_create_plain(&(*channel)->variables, SWITCH_EVENT_CHANNEL_DATA);
- switch_core_hash_init(&(*channel)->private_hash, pool);
+ switch_core_hash_init(&(*channel)->private_hash);
switch_queue_create(&(*channel)->dtmf_queue, SWITCH_DTMF_LOG_LEN, pool);
switch_queue_create(&(*channel)->dtmf_log_queue, SWITCH_DTMF_LOG_LEN, pool);
switch_mutex_lock(channel->flag_mutex);
if (!channel->app_flag_hash) {
- switch_core_hash_init(&channel->app_flag_hash, switch_core_session_get_pool(channel->session));
+ switch_core_hash_init(&channel->app_flag_hash);
new++;
}
globals.pool = pool;
switch_mutex_init(&globals.device_mutex, SWITCH_MUTEX_NESTED, pool);
- switch_core_hash_init(&globals.device_hash, globals.pool);
+ switch_core_hash_init(&globals.device_hash);
}
SWITCH_DECLARE(void) switch_channel_global_uninit(void)
SWITCH_DECLARE(switch_status_t) switch_console_init(switch_memory_pool_t *pool)
{
switch_mutex_init(&globals.func_mutex, SWITCH_MUTEX_NESTED, pool);
- switch_core_hash_init(&globals.func_hash, pool);
+ switch_core_hash_init(&globals.func_hash);
switch_console_add_complete_func("::console::list_available_modules", (switch_console_complete_callback_t) switch_console_list_available_modules);
switch_console_add_complete_func("::console::list_loaded_modules", (switch_console_complete_callback_t) switch_console_list_loaded_modules);
switch_console_add_complete_func("::console::list_interfaces", (switch_console_complete_callback_t) switch_console_list_interfaces);
SWITCH_DECLARE(switch_hash_index_t *) switch_core_mime_index(void)
{
- return switch_hash_first(NULL, runtime.mime_types);
+ return switch_core_hash_first( runtime.mime_types);
}
SWITCH_DECLARE(switch_status_t) switch_core_mime_add_type(const char *type, const char *ext)
memset(&IP_LIST, 0, sizeof(IP_LIST));
switch_core_new_memory_pool(&IP_LIST.pool);
- switch_core_hash_init(&IP_LIST.hash, IP_LIST.pool);
+ switch_core_hash_init(&IP_LIST.hash);
tmp_name = "rfc1918.auto";
switch_core_set_globals();
switch_core_session_init(runtime.memory_pool);
switch_event_create_plain(&runtime.global_vars, SWITCH_EVENT_CHANNEL_DATA);
- switch_core_hash_init(&runtime.mime_types, runtime.memory_pool);
- switch_core_hash_init_case(&runtime.ptimes, runtime.memory_pool, SWITCH_FALSE);
+ switch_core_hash_init(&runtime.mime_types);
+ switch_core_hash_init_case(&runtime.ptimes, SWITCH_FALSE);
load_mime_types();
runtime.flags |= flags;
runtime.sps_total = 30;
#include <switch.h>
#include "private/switch_core_pvt.h"
-#include <sqlite3.h>
-#include "../../../libs/sqlite/src/hash.h"
+#include "private/switch_hashtable_private.h"
-struct switch_hash {
- Hash table;
- switch_memory_pool_t *pool;
-};
-
-SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(switch_hash_t **hash, switch_memory_pool_t *pool, switch_bool_t case_sensitive)
+SWITCH_DECLARE(switch_status_t) switch_core_hash_init_case(switch_hash_t **hash, switch_bool_t case_sensitive)
{
- switch_hash_t *newhash;
-
- if (pool) {
- newhash = switch_core_alloc(pool, sizeof(*newhash));
- newhash->pool = pool;
- } else {
- switch_zmalloc(newhash, sizeof(*newhash));
- }
-
- switch_assert(newhash);
-
- sqlite3HashInit(&newhash->table, case_sensitive ? SQLITE_HASH_BINARY : SQLITE_HASH_STRING, 1);
- *hash = newhash;
-
- return SWITCH_STATUS_SUCCESS;
+ return switch_create_hashtable(hash, 16, case_sensitive ? switch_hash_default : switch_hash_default_ci, switch_hash_equalkeys);
}
+
SWITCH_DECLARE(switch_status_t) switch_core_hash_destroy(switch_hash_t **hash)
{
switch_assert(hash != NULL && *hash != NULL);
- sqlite3HashClear(&(*hash)->table);
-
- if (!(*hash)->pool) {
- free(*hash);
- }
- *hash = NULL;
+ switch_hashtable_destroy(hash);
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert(switch_hash_t *hash, const char *key, const void *data)
{
- sqlite3HashInsert(&hash->table, key, (int) strlen(key) + 1, (void *) data);
+ switch_hashtable_insert(hash, strdup(key), (void *)data, HASHTABLE_FLAG_FREE_KEY);
+
return SWITCH_STATUS_SUCCESS;
}
switch_mutex_lock(mutex);
}
- sqlite3HashInsert(&hash->table, key, (int) strlen(key) + 1, (void *) data);
+ switch_core_hash_insert(hash, key, data);
if (mutex) {
switch_mutex_unlock(mutex);
switch_thread_rwlock_wrlock(rwlock);
}
- sqlite3HashInsert(&hash->table, key, (int) strlen(key) + 1, (void *) data);
+ switch_core_hash_insert(hash, key, data);
if (rwlock) {
switch_thread_rwlock_unlock(rwlock);
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, const char *key)
{
- sqlite3HashInsert(&hash->table, key, (int) strlen(key) + 1, NULL);
+ switch_hashtable_remove(hash, (void *)key);
+
return SWITCH_STATUS_SUCCESS;
}
switch_mutex_lock(mutex);
}
- sqlite3HashInsert(&hash->table, key, (int) strlen(key) + 1, NULL);
+ switch_core_hash_delete(hash, key);
if (mutex) {
switch_mutex_unlock(mutex);
switch_thread_rwlock_wrlock(rwlock);
}
- sqlite3HashInsert(&hash->table, key, (int) strlen(key) + 1, NULL);
+ switch_core_hash_delete(hash, key);
if (rwlock) {
switch_thread_rwlock_unlock(rwlock);
When done, iterate through the list deleting hash entries
*/
- for (hi = switch_hash_first(NULL, hash); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first(hash); hi; hi = switch_core_hash_next(hi)) {
const void *key;
void *val;
- switch_hash_this(hi, &key, NULL, &val);
+ switch_core_hash_this(hi, &key, NULL, &val);
if (!callback || callback(key, val, pData)) {
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "delete", (const char *) key);
}
SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t *hash, const char *key)
{
- return sqlite3HashFind(&hash->table, key, (int) strlen(key) + 1);
+ return switch_hashtable_search(hash, (void *)key);
}
SWITCH_DECLARE(void *) switch_core_hash_find_locked(switch_hash_t *hash, const char *key, switch_mutex_t *mutex)
switch_mutex_lock(mutex);
}
- val = sqlite3HashFind(&hash->table, key, (int) strlen(key) + 1);
+ val = switch_core_hash_find(hash, key);
+
if (mutex) {
switch_mutex_unlock(mutex);
switch_thread_rwlock_rdlock(rwlock);
}
- val = sqlite3HashFind(&hash->table, key, (int) strlen(key) + 1);
+ val = switch_core_hash_find(hash, key);
if (rwlock) {
switch_thread_rwlock_unlock(rwlock);
SWITCH_DECLARE(switch_hash_index_t *) switch_core_hash_first(switch_hash_t *hash)
{
- return (switch_hash_index_t *) sqliteHashFirst(&hash->table);
+ return switch_hashtable_first(hash);
}
SWITCH_DECLARE(switch_hash_index_t *) switch_core_hash_next(switch_hash_index_t *hi)
{
- return (switch_hash_index_t *) sqliteHashNext((HashElem *) hi);
+ return switch_hashtable_next(hi);
}
SWITCH_DECLARE(void) switch_core_hash_this(switch_hash_index_t *hi, const void **key, switch_ssize_t *klen, void **val)
{
- if (key) {
- *key = sqliteHashKey((HashElem *) hi);
- if (klen) {
- *klen = strlen((char *) *key) + 1;
- }
- }
- if (val) {
- *val = sqliteHashData((HashElem *) hi);
- }
-}
-
-/* Deprecated */
-SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(char *deprecate_me, switch_hash_t *hash)
-{
- return switch_core_hash_first(hash);
-}
-
-/* Deprecated */
-SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(switch_hash_index_t *hi)
-{
- return switch_core_hash_next(hi);
+ switch_hashtable_this(hi, key, klen, val);
}
-/* Deprecated */
-SWITCH_DECLARE(void) switch_hash_this(switch_hash_index_t *hi, const void **key, switch_ssize_t *klen, void **val)
-{
- switch_core_hash_this(hi, key, klen, val);
-}
/* For Emacs:
* Local Variables:
return r;
switch_mutex_lock(runtime.session_hash_mutex);
- for (hi = switch_hash_first(NULL, session_manager.session_table); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( session_manager.session_table); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
if (val) {
session = (switch_core_session_t *) val;
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
switch_core_new_memory_pool(&pool);
switch_mutex_lock(runtime.session_hash_mutex);
- for (hi = switch_hash_first(NULL, session_manager.session_table); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( session_manager.session_table); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
if (val) {
session = (switch_core_session_t *) val;
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
switch_core_new_memory_pool(&pool);
switch_mutex_lock(runtime.session_hash_mutex);
- for (hi = switch_hash_first(NULL, session_manager.session_table); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( session_manager.session_table); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
if (val) {
session = (switch_core_session_t *) val;
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
switch_mutex_lock(runtime.session_hash_mutex);
- for (hi = switch_hash_first(NULL, session_manager.session_table); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( session_manager.session_table); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
if (val) {
session = (switch_core_session_t *) val;
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
switch_console_callback_match_t *my_matches = NULL;
switch_mutex_lock(runtime.session_hash_mutex);
- for (hi = switch_hash_first(NULL, session_manager.session_table); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( session_manager.session_table); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
if (val) {
session = (switch_core_session_t *) val;
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
session_manager.session_limit = 1000;
session_manager.session_id = 1;
session_manager.memory_pool = pool;
- switch_core_hash_init(&session_manager.session_table, session_manager.memory_pool);
+ switch_core_hash_init(&session_manager.session_table);
if (switch_test_flag((&runtime), SCF_SESSION_THREAD_POOL)) {
switch_threadattr_t *thd_attr;
}
}
- for (hi = switch_hash_first(NULL, CUSTOM_HASH); hi; hi = switch_hash_next(hi)) {
+ for (hi = switch_core_hash_first( CUSTOM_HASH); hi; hi = switch_core_hash_next(hi)) {
switch_event_subclass_t *subclass;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((subclass = (switch_event_subclass_t *) val)) {
FREE(subclass->name);
FREE(subclass->owner);
switch_mutex_init(&BLOCK, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
switch_mutex_init(&POOL_LOCK, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
switch_mutex_init(&EVENT_QUEUE_MUTEX, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
- switch_core_hash_init(&CUSTOM_HASH, RUNTIME_POOL);
+ switch_core_hash_init(&CUSTOM_HASH);
- switch_core_hash_init(&event_channel_manager.lahash, RUNTIME_POOL);
+ switch_core_hash_init(&event_channel_manager.lahash);
switch_mutex_init(&event_channel_manager.lamutex, SWITCH_MUTEX_NESTED, RUNTIME_POOL);
switch_thread_rwlock_create(&event_channel_manager.rwlock, RUNTIME_POOL);
- switch_core_hash_init(&event_channel_manager.hash, RUNTIME_POOL);
- switch_core_hash_init(&event_channel_manager.perm_hash, RUNTIME_POOL);
+ switch_core_hash_init(&event_channel_manager.hash);
+ switch_core_hash_init(&event_channel_manager.perm_hash);
event_channel_manager.ID = 1;
switch_mutex_lock(EVENT_QUEUE_MUTEX);
switch_thread_rwlock_wrlock(event_channel_manager.rwlock);
- while ((hi = switch_hash_first(NULL, event_channel_manager.perm_hash))) {
+ while ((hi = switch_core_hash_first( event_channel_manager.perm_hash))) {
switch_event_t *vals = NULL;
- switch_hash_this(hi, &var, NULL, &val);
+ switch_core_hash_this(hi, &var, NULL, &val);
vals = (switch_event_t *) val;
switch_core_hash_delete(event_channel_manager.perm_hash, var);
switch_event_destroy(&vals);
}
- while ((hi = switch_hash_first(NULL, event_channel_manager.hash))) {
- switch_hash_this(hi, NULL, NULL, &val);
+ while ((hi = switch_core_hash_first( event_channel_manager.hash))) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
head = (switch_event_channel_sub_node_head_t *) val;
switch_event_channel_unsub_head(NULL, head);
switch_core_hash_delete(event_channel_manager.hash, head->event_channel);
switch_hash_index_t *hi;
void *val;
- for (hi = switch_hash_first(NULL, event_channel_manager.hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( event_channel_manager.hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
if (val) {
head = (switch_event_channel_sub_node_head_t *) val;
la->key = key;
la->new = SWITCH_TRUE;
la->channel_id = channel_id;
- switch_core_hash_init(&la->hash, la->pool);
+ switch_core_hash_init(&la->hash);
switch_mutex_init(&la->mutex, SWITCH_MUTEX_NESTED, la->pool);
switch_mutex_lock(event_channel_manager.lamutex);
(*parser)->pool_auto_created = pool_auto_created;
(*parser)->pool = pool;
(*parser)->digit_timeout_ms = 1000;
- switch_core_hash_init(&(*parser)->hash, (*parser)->pool);
+ switch_core_hash_init(&(*parser)->hash);
status = SWITCH_STATUS_SUCCESS;
} else {
dmachine->name = switch_core_strdup(dmachine->pool, name);
switch_mutex_init(&dmachine->mutex, SWITCH_MUTEX_NESTED, dmachine->pool);
- switch_core_hash_init(&dmachine->binding_hash, dmachine->pool);
+ switch_core_hash_init(&dmachine->binding_hash);
if (match_callback) {
dmachine->match_callback = match_callback;
}
/*
if ((hi = switch_channel_variable_first(caller_channel))) {
- for (; hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &vvar, NULL, &vval);
+ for (; hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &vvar, NULL, &vval);
if (vvar && vval) {
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, (void *) vvar, (char *) vval);
}
switch_loadable_module_t *module;
switch_mutex_lock(loadable_modules.mutex);
- for (hi = switch_hash_first(NULL, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( loadable_modules.module_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
module = (switch_loadable_module_t *) val;
if (module->switch_module_runtime) {
if (!switch_true(replying) && !switch_stristr("global", proto) && !switch_true(switch_event_get_header(message_event, "skip_global_process"))) {
switch_mutex_lock(loadable_modules.mutex);
- for (hi = switch_hash_first(NULL, loadable_modules.chat_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( loadable_modules.chat_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((ci = (switch_chat_interface_t *) val)) {
if (ci->chat_send && !strncasecmp(ci->interface_name, "GLOBAL_", 7)) {
switch_loadable_module_t *module;
switch_mutex_lock(loadable_modules.mutex);
- for (hi = switch_hash_first(NULL, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( loadable_modules.module_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
module = (switch_loadable_module_t *) val;
callback(user_data, module->module_interface->module_name);
switch_loadable_module_path_init();
#endif
- switch_core_hash_init(&loadable_modules.module_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.endpoint_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.codec_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.timer_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.application_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.chat_application_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.api_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.json_api_hash, loadable_modules.pool);
- switch_core_hash_init(&loadable_modules.file_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.speech_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.asr_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.directory_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.chat_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.say_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.management_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.limit_hash, loadable_modules.pool);
- switch_core_hash_init_nocase(&loadable_modules.dialplan_hash, loadable_modules.pool);
- switch_core_hash_init(&loadable_modules.secondary_recover_hash, loadable_modules.pool);
+ switch_core_hash_init(&loadable_modules.module_hash);
+ switch_core_hash_init_nocase(&loadable_modules.endpoint_hash);
+ switch_core_hash_init_nocase(&loadable_modules.codec_hash);
+ switch_core_hash_init_nocase(&loadable_modules.timer_hash);
+ switch_core_hash_init_nocase(&loadable_modules.application_hash);
+ switch_core_hash_init_nocase(&loadable_modules.chat_application_hash);
+ switch_core_hash_init_nocase(&loadable_modules.api_hash);
+ switch_core_hash_init_nocase(&loadable_modules.json_api_hash);
+ switch_core_hash_init(&loadable_modules.file_hash);
+ switch_core_hash_init_nocase(&loadable_modules.speech_hash);
+ switch_core_hash_init_nocase(&loadable_modules.asr_hash);
+ switch_core_hash_init_nocase(&loadable_modules.directory_hash);
+ switch_core_hash_init_nocase(&loadable_modules.chat_hash);
+ switch_core_hash_init_nocase(&loadable_modules.say_hash);
+ switch_core_hash_init_nocase(&loadable_modules.management_hash);
+ switch_core_hash_init_nocase(&loadable_modules.limit_hash);
+ switch_core_hash_init_nocase(&loadable_modules.dialplan_hash);
+ switch_core_hash_init(&loadable_modules.secondary_recover_hash);
switch_mutex_init(&loadable_modules.mutex, SWITCH_MUTEX_NESTED, loadable_modules.pool);
if (!autoload) return SWITCH_STATUS_SUCCESS;
}
- for (hi = switch_hash_first(NULL, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( loadable_modules.module_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
module = (switch_loadable_module_t *) val;
if (!module->perm) {
do_shutdown(module, SWITCH_TRUE, SWITCH_FALSE, SWITCH_FALSE, NULL);
switch_yield(1000000);
- for (hi = switch_hash_first(NULL, loadable_modules.module_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( loadable_modules.module_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
module = (switch_loadable_module_t *) val;
if (!module->perm) {
do_shutdown(module, SWITCH_FALSE, SWITCH_TRUE, SWITCH_FALSE, NULL);
const switch_codec_implementation_t *imp;
switch_mutex_lock(loadable_modules.mutex);
- for (hi = switch_hash_first(NULL, loadable_modules.codec_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, NULL, NULL, &val);
+ for (hi = switch_core_hash_first( loadable_modules.codec_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, NULL, NULL, &val);
codec_interface = (switch_codec_interface_t *) val;
/* Look for the default ptime of the codec because it's the safest choice */
if (global_init) {
return;
}
- switch_core_hash_init(&alloc_hash, pool);
+ switch_core_hash_init(&alloc_hash);
#ifdef ENABLE_ZRTP
if (zrtp_on) {
uint32_t cache_len;
switch_mutex_lock(port_lock);
- for (hi = switch_hash_first(NULL, alloc_hash); hi; hi = switch_hash_next(hi)) {
- switch_hash_this(hi, &var, NULL, &val);
+ for (hi = switch_core_hash_first( alloc_hash); hi; hi = switch_core_hash_next(hi)) {
+ switch_core_hash_this(hi, &var, NULL, &val);
if ((alloc = (switch_core_port_allocator_t *) val)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroy port allocator for %s\n", (char *) var);
switch_core_port_allocator_destroy(&alloc);
memset(&TIMEZONES_LIST, 0, sizeof(TIMEZONES_LIST));
switch_core_new_memory_pool(&TIMEZONES_LIST.pool);
- switch_core_hash_init(&TIMEZONES_LIST.hash, TIMEZONES_LIST.pool);
+ switch_core_hash_init(&TIMEZONES_LIST.hash);
if ((xml = switch_xml_open_cfg("timezones.conf", &cfg, NULL))) {
if ((x_lists = switch_xml_child(cfg, "timezones"))) {
} else {
- while ((hi = switch_hash_first(NULL, CACHE_HASH))) {
- switch_hash_this(hi, &var, NULL, &val);
+ while ((hi = switch_core_hash_first( CACHE_HASH))) {
+ switch_core_hash_this(hi, &var, NULL, &val);
switch_xml_free(val);
switch_core_hash_delete(CACHE_HASH, var);
r++;
}
- while ((hi = switch_hash_first(NULL, CACHE_EXPIRES_HASH))) {
- switch_hash_this(hi, &var, NULL, &val);
+ while ((hi = switch_core_hash_first( CACHE_EXPIRES_HASH))) {
+ switch_core_hash_this(hi, &var, NULL, &val);
switch_safe_free(val);
switch_core_hash_delete(CACHE_EXPIRES_HASH, var);
}
switch_mutex_init(&REFLOCK, SWITCH_MUTEX_NESTED, XML_MEMORY_POOL);
switch_mutex_init(&FILE_LOCK, SWITCH_MUTEX_NESTED, XML_MEMORY_POOL);
switch_mutex_init(&XML_GEN_LOCK, SWITCH_MUTEX_NESTED, XML_MEMORY_POOL);
- switch_core_hash_init(&CACHE_HASH, XML_MEMORY_POOL);
- switch_core_hash_init(&CACHE_EXPIRES_HASH, XML_MEMORY_POOL);
+ switch_core_hash_init(&CACHE_HASH);
+ switch_core_hash_init(&CACHE_EXPIRES_HASH);
switch_thread_rwlock_create(&B_RWLOCK, XML_MEMORY_POOL);