mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 17:22:21 +00:00
FS-10167: Fixed up linux build for latest work on channel and protocol removal at runtime
This commit is contained in:
parent
a81b57bd35
commit
9fc65c8752
@ -1,23 +1,23 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, Shane Bryldt
|
* Copyright (c) 2017, Shane Bryldt
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
*
|
*
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* * Neither the name of the original author; nor the names of any contributors
|
* * Neither the name of the original author; nor the names of any contributors
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
@ -64,7 +64,7 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_create(blade_subscriptionmgr_t **b
|
|||||||
blade_subscriptionmgr_t *bsmgr = NULL;
|
blade_subscriptionmgr_t *bsmgr = NULL;
|
||||||
|
|
||||||
ks_assert(bsmgrP);
|
ks_assert(bsmgrP);
|
||||||
|
|
||||||
ks_pool_open(&pool);
|
ks_pool_open(&pool);
|
||||||
ks_assert(pool);
|
ks_assert(pool);
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ KS_DECLARE(ks_bool_t) blade_subscriptionmgr_subscriber_add(blade_subscriptionmgr
|
|||||||
blade_subscription_create(&bsub, pool, protocol, realm, channel);
|
blade_subscription_create(&bsub, pool, protocol, realm, channel);
|
||||||
ks_assert(bsub);
|
ks_assert(bsub);
|
||||||
|
|
||||||
ks_hash_insert(bsmgr->subscriptions, (void *)ks_pstrdup(pool, key), bsub);
|
ks_hash_insert(bsmgr->subscriptions, (void *)ks_pstrdup(pool, key), (void *)bsub);
|
||||||
propagate = KS_TRUE;
|
propagate = KS_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,13 +391,13 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
|
|||||||
bs = blade_routemgr_route_lookup(blade_handle_routemgr_get(bsmgr->handle), (const char *)key);
|
bs = blade_routemgr_route_lookup(blade_handle_routemgr_get(bsmgr->handle), (const char *)key);
|
||||||
if (bs) {
|
if (bs) {
|
||||||
if (!routers) ks_hash_create(&routers, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
if (!routers) ks_hash_create(&routers, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
||||||
if (!ks_hash_search(routers, blade_session_id_get(bs), KS_UNLOCKED)) ks_hash_insert(routers, blade_session_id_get(bs), bs);
|
if (!ks_hash_search(routers, (void *)blade_session_id_get(bs), KS_UNLOCKED)) ks_hash_insert(routers, (void *)blade_session_id_get(bs), (void *)bs);
|
||||||
else blade_session_read_unlock(bs);
|
else blade_session_read_unlock(bs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (command == BLADE_RPCBROADCAST_COMMAND_CHANNEL_REMOVE) {
|
if (command == BLADE_RPCBROADCAST_COMMAND_CHANNEL_REMOVE) {
|
||||||
if (!channels) ks_hash_create(&channels, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
if (!channels) ks_hash_create(&channels, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
||||||
ks_hash_insert(channels, channel, (void *)KS_TRUE);
|
ks_hash_insert(channels, (void *)channel, (void *)KS_TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,13 +435,13 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
|
|||||||
bs = blade_routemgr_route_lookup(blade_handle_routemgr_get(bsmgr->handle), (const char *)key2);
|
bs = blade_routemgr_route_lookup(blade_handle_routemgr_get(bsmgr->handle), (const char *)key2);
|
||||||
if (bs) {
|
if (bs) {
|
||||||
if (!routers) ks_hash_create(&routers, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
if (!routers) ks_hash_create(&routers, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
||||||
if (!ks_hash_search(routers, blade_session_id_get(bs), KS_UNLOCKED)) ks_hash_insert(routers, blade_session_id_get(bs), bs);
|
if (!ks_hash_search(routers, (void *)blade_session_id_get(bs), KS_UNLOCKED)) ks_hash_insert(routers, (void *)blade_session_id_get(bs), (void *)bs);
|
||||||
else blade_session_read_unlock(bs);
|
else blade_session_read_unlock(bs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!channels) ks_hash_create(&channels, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
if (!channels) ks_hash_create(&channels, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
||||||
ks_hash_insert(channels, blade_subscription_channel_get(bsub), (void *)KS_TRUE);
|
ks_hash_insert(channels, (void *)blade_subscription_channel_get(bsub), (void *)KS_TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,7 +455,7 @@ KS_DECLARE(ks_status_t) blade_subscriptionmgr_broadcast(blade_subscriptionmgr_t
|
|||||||
if (bs) {
|
if (bs) {
|
||||||
if (!excluded_nodeid || ks_safe_strcasecmp(blade_session_id_get(bs), excluded_nodeid)) {
|
if (!excluded_nodeid || ks_safe_strcasecmp(blade_session_id_get(bs), excluded_nodeid)) {
|
||||||
if (!routers) ks_hash_create(&routers, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
if (!routers) ks_hash_create(&routers, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, pool);
|
||||||
ks_hash_insert(routers, blade_session_id_get(bs), bs);
|
ks_hash_insert(routers, (void *)blade_session_id_get(bs), (void *)bs);
|
||||||
}
|
}
|
||||||
else blade_session_read_unlock(bs);
|
else blade_session_read_unlock(bs);
|
||||||
}
|
}
|
||||||
|
@ -169,7 +169,7 @@ ks_bool_t test_join_request_handler(blade_rpc_request_t *brpcreq, void *data)
|
|||||||
void *key = NULL;
|
void *key = NULL;
|
||||||
void *value = NULL;
|
void *value = NULL;
|
||||||
|
|
||||||
ks_hash_this(it, &key, NULL, &value);
|
ks_hash_this(it, (const void **)&key, NULL, &value);
|
||||||
cJSON_AddItemToArray(channels, cJSON_CreateString((const char *)key));
|
cJSON_AddItemToArray(channels, cJSON_CreateString((const char *)key));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ ks_bool_t test_leave_request_handler(blade_rpc_request_t *brpcreq, void *data)
|
|||||||
void *key = NULL;
|
void *key = NULL;
|
||||||
void *value = NULL;
|
void *value = NULL;
|
||||||
|
|
||||||
ks_hash_this(it, &key, NULL, &value);
|
ks_hash_this(it, (const void **)&key, NULL, &value);
|
||||||
cJSON_AddItemToArray(channels, cJSON_CreateString((const char *)key));
|
cJSON_AddItemToArray(channels, cJSON_CreateString((const char *)key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ KS_DECLARE(ks_status_t) ks_pool_clear(ks_pool_t *pool);
|
|||||||
KS_DECLARE(ks_bool_t) ks_pool_verify(void *addr);
|
KS_DECLARE(ks_bool_t) ks_pool_verify(void *addr);
|
||||||
|
|
||||||
// @todo fill in documentation
|
// @todo fill in documentation
|
||||||
inline KS_DECLARE(ks_pool_t *) ks_pool_get(void *addr);
|
KS_DECLARE(ks_pool_t *) ks_pool_get(void *addr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* void *ks_pool_alloc
|
* void *ks_pool_alloc
|
||||||
@ -303,7 +303,7 @@ KS_DECLARE(void *) ks_pool_ref_ex(void *addr, ks_status_t *error_p);
|
|||||||
*
|
*
|
||||||
* DESCRIPTION:
|
* DESCRIPTION:
|
||||||
*
|
*
|
||||||
* Reallocate an address in a memory pool to a new size.
|
* Reallocate an address in a memory pool to a new size.
|
||||||
*
|
*
|
||||||
* RETURNS:
|
* RETURNS:
|
||||||
*
|
*
|
||||||
@ -325,7 +325,7 @@ KS_DECLARE(void *) ks_pool_resize(void *old_addr, const ks_size_t new_size);
|
|||||||
*
|
*
|
||||||
* DESCRIPTION:
|
* DESCRIPTION:
|
||||||
*
|
*
|
||||||
* Reallocate an address in a memory pool to a new size.
|
* Reallocate an address in a memory pool to a new size.
|
||||||
*
|
*
|
||||||
* RETURNS:
|
* RETURNS:
|
||||||
*
|
*
|
||||||
|
@ -602,7 +602,7 @@ KS_DECLARE(ks_bool_t) ks_pool_verify(void *addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @todo fill in documentation
|
// @todo fill in documentation
|
||||||
inline KS_DECLARE(ks_pool_t *) ks_pool_get(void *addr)
|
KS_DECLARE(ks_pool_t *) ks_pool_get(void *addr)
|
||||||
{
|
{
|
||||||
ks_assert(addr);
|
ks_assert(addr);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user