]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10167: Fixed up linux build for latest work on channel and protocol removal at...
authorShane Bryldt <astaelan@gmail.com>
Fri, 18 Aug 2017 22:44:25 +0000 (17:44 -0500)
committerShane Bryldt <astaelan@gmail.com>
Fri, 18 Aug 2017 22:44:25 +0000 (17:44 -0500)
libs/libblade/src/blade_subscriptionmgr.c
libs/libblade/test/testcon.c
libs/libks/src/include/ks_pool.h
libs/libks/src/ks_pool.c

index 75c11eef61b34406ac2558ba0780fa11e290f483..e09dabfaa0703e902cc310f26706626785f68a01 100644 (file)
@@ -1,23 +1,23 @@
 /*
  * Copyright (c) 2017, Shane Bryldt
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
- * 
+ *
  * * Redistributions of source code must retain the above copyright
  * notice, this list of conditions and the following disclaimer.
- * 
+ *
  * * Redistributions in binary form must reproduce the above copyright
  * notice, this list of conditions and the following disclaimer in the
  * documentation and/or other materials provided with the distribution.
- * 
+ *
  * * 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
  * without specific prior written permission.
- * 
- * 
+ *
+ *
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  * 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;
 
        ks_assert(bsmgrP);
-       
+
        ks_pool_open(&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);
                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;
        }
 
@@ -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);
                                if (bs) {
                                        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);
                                }
                        }
                        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);
-                               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);
                                        if (bs) {
                                                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);
                                        }
                                }
 
                                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 (!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);
-                       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);
        }
index 3a583ce05f39f33779dde9bdbd3e0df796b1ade1..810ecb348112cde86426dcf2e45c16cf0dfc4755 100644 (file)
@@ -169,7 +169,7 @@ ks_bool_t test_join_request_handler(blade_rpc_request_t *brpcreq, void *data)
                void *key = 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));
        }
 
@@ -239,7 +239,7 @@ ks_bool_t test_leave_request_handler(blade_rpc_request_t *brpcreq, void *data)
                void *key = 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));
        }
 
index 5b03a20f9b45ac5c0f294596c361f122f61747a4..6b16337a16ed54aaa9a5454a33fadc7a1baa84f8 100644 (file)
@@ -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);
 
 // @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
@@ -303,7 +303,7 @@ KS_DECLARE(void *) ks_pool_ref_ex(void *addr, ks_status_t *error_p);
  *
  * DESCRIPTION:
  *
- * Reallocate an address in a memory pool to a new size.  
+ * Reallocate an address in a memory pool to a new size.
  *
  * RETURNS:
  *
@@ -325,7 +325,7 @@ KS_DECLARE(void *) ks_pool_resize(void *old_addr, const ks_size_t new_size);
  *
  * DESCRIPTION:
  *
- * Reallocate an address in a memory pool to a new size.  
+ * Reallocate an address in a memory pool to a new size.
  *
  * RETURNS:
  *
index 76346aa2e953ac40c7b964383dcd90f23a3c6900..b030d396530003845f691eb5856ba4c972a59598 100644 (file)
@@ -602,7 +602,7 @@ KS_DECLARE(ks_bool_t) ks_pool_verify(void *addr)
 }
 
 // @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);
 #ifdef DEBUG