FS-10167: Updating linux build

This commit is contained in:
Shane Bryldt 2017-09-21 00:21:49 -05:00
parent 43cb4e3468
commit c0a02f544d
4 changed files with 16 additions and 23 deletions

View File

@ -13,9 +13,9 @@ libunqlite_la_LIBADD = -lpthread
lib_LTLIBRARIES = libblade.la
libblade_la_SOURCES = src/blade.c src/blade_stack.c
libblade_la_SOURCES += src/blade_transportmgr.c src/blade_rpcmgr.c src/blade_routemgr.c src/blade_subscriptionmgr.c
libblade_la_SOURCES += src/blade_upstreammgr.c src/blade_mastermgr.c src/blade_connectionmgr.c src/blade_sessionmgr.c
libblade_la_SOURCES += src/blade_mastermgr.c src/blade_connectionmgr.c src/blade_sessionmgr.c
libblade_la_SOURCES += src/blade_identity.c src/blade_rpc.c src/blade_connection.c src/blade_session.c
libblade_la_SOURCES += src/blade_protocol.c src/blade_subscription.c
libblade_la_SOURCES += src/blade_protocol.c src/blade_subscription.c src/blade_channel.c
libblade_la_SOURCES += src/blade_transport.c src/blade_transport_wss.c
libblade_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
@ -25,9 +25,9 @@ libblade_la_LIBADD = libunqlite.la
library_includedir = $(prefix)/include
library_include_HEADERS = src/include/blade.h src/include/blade_types.h src/include/blade_stack.h
library_include_HEADERS += src/include/blade_transportmgr.h src/include/blade_rpcmgr.h src/include/blade_routemgr.h src/include/blade_subscriptionmgr.h
library_include_HEADERS += src/include/blade_upstreammgr.h src/include/blade_mastermgr.h src/include/blade_connectionmgr.h src/include/blade_sessionmgr.h
library_include_HEADERS += src/include/blade_mastermgr.h src/include/blade_connectionmgr.h src/include/blade_sessionmgr.h
library_include_HEADERS += src/include/blade_identity.h src/include/blade_rpc.h src/include/blade_connection.h src/include/blade_session.h
library_include_HEADERS += src/include/blade_protocol.h src/include/blade_subscription.h
library_include_HEADERS += src/include/blade_protocol.h src/include/blade_subscription.h src/include/blade_channel.h
library_include_HEADERS += src/include/blade_transport.h src/include/blade_transport_wss.h
library_include_HEADERS += src/include/unqlite.h test/tap.h

View File

@ -143,12 +143,8 @@ ks_status_t blade_mastermgr_config(blade_mastermgr_t *bmmgr, config_setting_t *c
KS_DECLARE(ks_status_t) blade_mastermgr_startup(blade_mastermgr_t *bmmgr, config_setting_t *config)
{
ks_pool_t *pool = NULL;
ks_assert(bmmgr);
pool = ks_pool_get(bmmgr);
if (blade_mastermgr_config(bmmgr, config) != KS_STATUS_SUCCESS) {
ks_log(KS_LOG_DEBUG, "blade_mastermgr_config failed\n");
return KS_STATUS_FAIL;
@ -286,7 +282,6 @@ KS_DECLARE(ks_status_t) blade_mastermgr_protocol_controller_add(blade_mastermgr_
KS_DECLARE(ks_status_t) blade_mastermgr_protocol_controller_remove(blade_mastermgr_t *bmmgr, const char *protocol, const char *controller)
{
ks_status_t ret = KS_STATUS_SUCCESS;
ks_pool_t *pool = NULL;
blade_protocol_t *bp = NULL;
ks_bool_t remove = KS_FALSE;
@ -294,8 +289,6 @@ KS_DECLARE(ks_status_t) blade_mastermgr_protocol_controller_remove(blade_masterm
ks_assert(protocol);
ks_assert(controller);
pool = ks_pool_get(bmmgr);
ks_hash_write_lock(bmmgr->protocols);
bp = (blade_protocol_t *)ks_hash_search(bmmgr->protocols, (void *)protocol, KS_UNLOCKED);

View File

@ -183,7 +183,7 @@ KS_DECLARE(ks_bool_t) blade_protocol_controller_verify(blade_protocol_t *bp, con
ks_assert(bp);
ks_assert(controller);
ret = (ks_bool_t)(uintptr_t)ks_hash_search(bp->controllers, controller, KS_READLOCKED);
ret = (ks_bool_t)(uintptr_t)ks_hash_search(bp->controllers, (void *)controller, KS_READLOCKED);
ks_hash_read_unlock(bp->controllers);
return ret;

View 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
@ -69,7 +69,7 @@ KS_DECLARE(ks_status_t) blade_routemgr_create(blade_routemgr_t **brmgrP, blade_h
blade_routemgr_t *brmgr = NULL;
ks_assert(brmgrP);
ks_pool_open(&pool);
ks_assert(pool);
@ -229,7 +229,7 @@ KS_DECLARE(blade_session_t *) blade_routemgr_upstream_lookup(blade_routemgr_t *b
ks_rwl_read_lock(brmgr->local_lock);
if (brmgr->local_nodeid) bs = blade_sessionmgr_session_lookup(blade_handle_sessionmgr_get(brmgr->handle), brmgr->local_nodeid);
ks_rwl_read_unlock(brmgr->local_lock);
return bs;
@ -289,7 +289,7 @@ KS_DECLARE(ks_bool_t) blade_routemgr_master_pack(blade_routemgr_t *brmgr, cJSON
ks_assert(key);
ks_rwl_read_lock(brmgr->master_lock);
if (brmgr->master_nodeid) {
ret = KS_TRUE;
cJSON_AddStringToObject(json, key, brmgr->master_nodeid);
@ -298,7 +298,7 @@ KS_DECLARE(ks_bool_t) blade_routemgr_master_pack(blade_routemgr_t *brmgr, cJSON
// blade CoreRPC's to route to the known master node, but is also used to pass to downstream nodes
// when they connect
}
ks_rwl_read_unlock(brmgr->master_lock);
return ret;
@ -374,7 +374,7 @@ ks_status_t blade_routemgr_purge(blade_routemgr_t *brmgr, const char *target)
if (value && !ks_safe_strcasecmp(value, target)) {
if (!cleanup) ks_hash_create(&cleanup, KS_HASH_MODE_CASE_INSENSITIVE, KS_HASH_FLAG_NOLOCK | KS_HASH_FLAG_DUP_CHECK, ks_pool_get(brmgr));
ks_hash_insert(cleanup, (const void *)key, (void *)value);
ks_hash_insert(cleanup, (void *)key, (void *)value);
}
}