]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10167: Some fixes to get the windows release build working, and fixed a mistake...
authorShane Bryldt <astaelan@gmail.com>
Fri, 21 Apr 2017 22:27:39 +0000 (16:27 -0600)
committerShane Bryldt <astaelan@gmail.com>
Fri, 21 Apr 2017 22:27:39 +0000 (16:27 -0600)
12 files changed:
libs/libblade/src/blade_connection.c
libs/libblade/src/blade_identity.c
libs/libblade/src/blade_method.c
libs/libblade/src/blade_module.c
libs/libblade/src/blade_module_wss.c
libs/libblade/src/blade_protocol.c
libs/libblade/src/blade_session.c
libs/libblade/src/blade_space.c
libs/libblade/src/blade_stack.c
libs/libblade/test/blades.c
libs/libks/src/ks.c
libs/win32/libsodium/libsodium.2015.vcxproj

index a8df9af3fca75826517aab3624b0c3516a000019..a7212c10d53054bda63e6f2e6c49f8d66fdd8691 100644 (file)
@@ -114,7 +114,7 @@ KS_DECLARE(ks_status_t) blade_connection_create(blade_connection_t **bcP, blade_
        ks_q_create(&bc->sending, pool, 0);
        ks_assert(bc->sending);
 
-       ks_assert(ks_pool_set_cleanup(pool, bc, NULL, blade_connection_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bc, NULL, blade_connection_cleanup);
 
        ks_log(KS_LOG_DEBUG, "Created\n");
 
index c28c4a92f909298fb843d175a41be68ec99a1ce4..21754aa68ba06952002a532761c3f5727b6839d3 100644 (file)
@@ -75,7 +75,7 @@ KS_DECLARE(ks_status_t) blade_identity_create(blade_identity_t **biP, ks_pool_t
        bi = ks_pool_alloc(pool, sizeof(blade_identity_t));
        bi->pool = pool;
 
-       ks_assert(ks_pool_set_cleanup(pool, bi, NULL, blade_identity_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bi, NULL, blade_identity_cleanup);
 
        *biP = bi;
 
index 9b38bb474d5805a097570b652c84941342f65b72..8e7a69a2437212ab403c2bf5867d9fa9a4e81076 100644 (file)
@@ -84,7 +84,7 @@ KS_DECLARE(ks_status_t) blade_method_create(blade_method_t **bmP, blade_space_t
        bm->name = ks_pstrdup(pool, name);
        bm->callback = callback;
 
-       ks_assert(ks_pool_set_cleanup(pool, bm, NULL, blade_method_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bm, NULL, blade_method_cleanup);
 
        *bmP = bm;
 
index 0737e0d871f034d1babc1f066a5e4e5b9675f2c4..87ea7b3de95b56c129cc840db7919ca59d33a330 100644 (file)
@@ -44,9 +44,9 @@ struct blade_module_s {
 
 static void blade_module_cleanup(ks_pool_t *pool, void *ptr, void *arg, ks_pool_cleanup_action_t action, ks_pool_cleanup_type_t type)
 {
-       blade_module_t *bm = (blade_module_t *)ptr;
+       //blade_module_t *bm = (blade_module_t *)ptr;
 
-       ks_assert(bm);
+       //ks_assert(bm);
 
        switch (action) {
        case KS_MPCL_ANNOUNCE:
@@ -78,7 +78,7 @@ KS_DECLARE(ks_status_t) blade_module_create(blade_module_t **bmP, blade_handle_t
        bm->module_data = module_data;
        bm->module_callbacks = module_callbacks;
 
-       ks_assert(ks_pool_set_cleanup(pool, bm, NULL, blade_module_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bm, NULL, blade_module_cleanup);
 
        ks_log(KS_LOG_DEBUG, "Created\n");
 
index 1a56f51a89af923d0abd8811a485805a31d96021..c5fc231e19fd64e1f84b03f21d1f04f08c24aba5 100644 (file)
@@ -125,9 +125,9 @@ static blade_transport_callbacks_t g_transport_wss_callbacks =
 
 static void blade_module_wss_cleanup(ks_pool_t *pool, void *ptr, void *arg, ks_pool_cleanup_action_t action, ks_pool_cleanup_type_t type)
 {
-       blade_module_wss_t *bm_wss = (blade_module_wss_t *)ptr;
+       //blade_module_wss_t *bm_wss = (blade_module_wss_t *)ptr;
 
-       ks_assert(bm_wss);
+       //ks_assert(bm_wss);
 
        switch (action) {
        case KS_MPCL_ANNOUNCE:
@@ -158,7 +158,7 @@ KS_DECLARE(ks_status_t) blade_module_wss_create(blade_module_t **bmP, blade_hand
        bm_wss->module_callbacks = &g_module_wss_callbacks;
        bm_wss->transport_callbacks = &g_transport_wss_callbacks;
 
-       ks_assert(ks_pool_set_cleanup(pool, bm_wss, NULL, blade_module_wss_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bm_wss, NULL, blade_module_wss_cleanup);
 
        ks_log(KS_LOG_DEBUG, "Created\n");
 
@@ -499,7 +499,7 @@ ks_status_t blade_transport_wss_create(blade_transport_wss_t **bt_wssP, ks_pool_
        bt_wss->sock = sock;
        if (session_id) bt_wss->session_id = ks_pstrdup(pool, session_id);
 
-       ks_assert(ks_pool_set_cleanup(pool, bt_wss, NULL, blade_transport_wss_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bt_wss, NULL, blade_transport_wss_cleanup);
 
        ks_log(KS_LOG_DEBUG, "Created\n");
 
index 78a686d4e925ccc5f1e66a36748aad2627430115..301909facc7ff4fc93b068e46099a1b5c0b7c92b 100644 (file)
@@ -74,7 +74,7 @@ KS_DECLARE(ks_status_t) blade_request_create(blade_request_t **breqP,
        breq->message_id = cJSON_GetObjectCstr(breq->message, "id");
        breq->callback = callback;
 
-       ks_assert(ks_pool_set_cleanup(pool, breq, NULL, blade_request_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, breq, NULL, blade_request_cleanup);
 
        *breqP = breq;
 
@@ -137,7 +137,7 @@ KS_DECLARE(ks_status_t) blade_response_create(blade_response_t **bresP,
        bres->request = breq;
        bres->message = cJSON_Duplicate(json, 1);
 
-       ks_assert(ks_pool_set_cleanup(pool, bres, NULL, blade_response_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bres, NULL, blade_response_cleanup);
 
        *bresP = bres;
 
@@ -196,7 +196,7 @@ KS_DECLARE(ks_status_t) blade_event_create(blade_event_t **bevP,
        bev->session_id = ks_pstrdup(pool, session_id);
        bev->message = cJSON_Duplicate(json, 1);
 
-       ks_assert(ks_pool_set_cleanup(pool, bev, NULL, blade_event_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bev, NULL, blade_event_cleanup);
 
        *bevP = bev;
 
index c08a0a10622e726d7eeac26d62359bd80ab8c045..2c7103293a589f11e463988f5f4f95f34cac08e3 100644 (file)
@@ -136,7 +136,7 @@ KS_DECLARE(ks_status_t) blade_session_create(blade_session_t **bsP, blade_handle
     ks_rwl_create(&bs->properties_lock, pool);
        ks_assert(bs->properties_lock);
 
-       ks_assert(ks_pool_set_cleanup(pool, bs, NULL, blade_session_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bs, NULL, blade_session_cleanup);
 
        ks_log(KS_LOG_DEBUG, "Created\n");
 
index 29682d61ae0d634abb229d1826a086694423f65a..6aa3482be01be9d9c336eadcdc8280043e0a0502 100644 (file)
@@ -80,7 +80,7 @@ KS_DECLARE(ks_status_t) blade_space_create(blade_space_t **bsP, blade_handle_t *
        ks_hash_create(&bs->methods, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_RWLOCK | KS_HASH_FLAG_DUP_CHECK | KS_HASH_FLAG_FREE_VALUE, bs->pool);
        ks_assert(bs);
 
-       ks_assert(ks_pool_set_cleanup(pool, bs, NULL, blade_space_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bs, NULL, blade_space_cleanup);
 
        *bsP = bs;
 
index 2111157da8f0b4c5754e29b9d5468cbf69a0dc45..cd62528d2431734dddee14918111e05d63f58cd9 100644 (file)
@@ -74,9 +74,9 @@ struct blade_handle_transport_registration_s {
 
 static void blade_handle_transport_registration_cleanup(ks_pool_t *pool, void *ptr, void *arg, ks_pool_cleanup_action_t action, ks_pool_cleanup_type_t type)
 {
-       blade_handle_transport_registration_t *bhtr = (blade_handle_transport_registration_t *)ptr;
+       //blade_handle_transport_registration_t *bhtr = (blade_handle_transport_registration_t *)ptr;
 
-       ks_assert(bhtr);
+       //ks_assert(bhtr);
 
        switch (action) {
        case KS_MPCL_ANNOUNCE:
@@ -105,7 +105,7 @@ KS_DECLARE(ks_status_t) blade_handle_transport_registration_create(blade_handle_
        bhtr->module = module;
        bhtr->callbacks = callbacks;
 
-       ks_assert(ks_pool_set_cleanup(pool, bhtr, NULL, blade_handle_transport_registration_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bhtr, NULL, blade_handle_transport_registration_cleanup);
 
        *bhtrP = bhtr;
 
@@ -159,7 +159,7 @@ ks_status_t blade_handle_session_state_callback_registration_create(blade_handle
        bhsscr->data = data;
        bhsscr->callback = callback;
 
-       ks_assert(ks_pool_set_cleanup(pool, bhsscr, NULL, blade_handle_session_state_callback_registration_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bhsscr, NULL, blade_handle_session_state_callback_registration_cleanup);
 
        *bhsscrP = bhsscr;
 
@@ -236,7 +236,7 @@ KS_DECLARE(ks_status_t) blade_handle_create(blade_handle_t **bhP)
        ks_hash_create(&bh->requests, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_RWLOCK | KS_HASH_FLAG_DUP_CHECK, bh->pool);
        ks_assert(bh->requests);
 
-       ks_assert(ks_pool_set_cleanup(pool, bh, NULL, blade_handle_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bh, NULL, blade_handle_cleanup);
 
        *bhP = bh;
 
index 565947725805fab91985451c01fa8764da8d201e..35e2ef34f645d191c51e88d2d01d2a3f172361f8 100644 (file)
@@ -215,8 +215,9 @@ ks_status_t blade_module_chat_create(blade_module_t **bmP, blade_handle_t *bh)
        ks_assert(bm_chat->participants);
 
        blade_module_create(&bm_chat->module, bh, pool, bm_chat, &g_module_chat_callbacks);
+       ks_assert(bm_chat->module);
 
-       ks_assert(ks_pool_set_cleanup(pool, bm_chat, NULL, blade_module_chat_cleanup) == KS_STATUS_SUCCESS);
+       ks_pool_set_cleanup(pool, bm_chat, NULL, blade_module_chat_cleanup);
 
        ks_log(KS_LOG_DEBUG, "Created\n");
 
index 1c35c4b7bcb4181158b91fef9473464985682344..f356127637edc8212eca91e8b23c67bcaaebc069 100644 (file)
@@ -80,8 +80,9 @@ KS_DECLARE(ks_status_t) ks_init(void)
 #ifdef __WINDOWS__
        WSADATA wsaData;
        WORD wVersionRequested = MAKEWORD(2, 2);
-
-       ks_assert(!WSAStartup(wVersionRequested, &wsaData));
+       if (WSAStartup(wVersionRequested, &wsaData)) {
+               abort();
+       }
 #endif
 
        return KS_STATUS_SUCCESS;
index c9d706525e927a3be803ad4a2ffdeab62e64834e..a576b007b769f57e170395252f0796345ed1caa0 100644 (file)
@@ -39,6 +39,7 @@
     <ProjectGuid>{A185B162-6CB6-4502-B03F-B56F7699A8D9}</ProjectGuid>
     <Keyword>Win32Proj</Keyword>
     <RootNamespace>libsodium</RootNamespace>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -93,7 +94,7 @@
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDLL|x64'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <WholeProgramOptimization>false</WholeProgramOptimization>
     <CharacterSet>MultiByte</CharacterSet>
     <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>