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");
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;
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;
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:
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");
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:
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");
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");
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;
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;
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;
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");
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;
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:
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;
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;
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;
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");
#ifdef __WINDOWS__
WSADATA wsaData;
WORD wVersionRequested = MAKEWORD(2, 2);
-
- ks_assert(!WSAStartup(wVersionRequested, &wsaData));
+ if (WSAStartup(wVersionRequested, &wsaData)) {
+ abort();
+ }
#endif
return KS_STATUS_SUCCESS;
<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">
<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>