FS-10167: Updates to previous overhaul commit to get everything building right under linux

This commit is contained in:
Shane Bryldt committed 2017-05-22 12:02:04 -05:00
1 parent 9fa52c742e
commit 222780795d
9 files changed
+45 -45

No files matched your search

+1 -1
View File
@@ -208,7 +208,7 @@ KS_DECLARE(ks_status_t) blade_session_shutdown(blade_session_t *bs)
void *key = NULL;
void *value = NULL;
ks_hash_this(it, &key, NULL, &value);
ks_hash_this(it, (const void **)&key, NULL, &value);
blade_handle_route_remove(bs->handle, (const char *)key);
}
+7 -7
View File
@@ -328,7 +328,7 @@ KS_DECLARE(ks_status_t) blade_handle_startup(blade_handle_t *bh, config_setting_
const char *realm = bh->master_realms[index];
//char *identity = ks_pstrcat(bh->pool, bh->master_user, "@", realm); // @todo this does not work... why?
char *identity = ks_psprintf(bh->pool, "%s@%s", bh->master_user, realm);
blade_handle_identity_register(bh, identity);
blade_handle_realm_register(bh, realm);
@@ -421,7 +421,7 @@ KS_DECLARE(ks_status_t) blade_handle_identity_register(blade_handle_t *bh, const
key = ks_pstrdup(bh->pool, identity);
ks_hash_insert(bh->identities, (void *)key, (void *)KS_TRUE);
ks_log(KS_LOG_DEBUG, "Identity Registered: %s\n", key);
return KS_STATUS_SUCCESS;
@@ -497,9 +497,9 @@ KS_DECLARE(ks_status_t) blade_handle_route_add(blade_handle_t *bh, const char *i
key = ks_pstrdup(bh->pool, identity);
value = ks_pstrdup(bh->pool, id);
ks_hash_insert(bh->identities, (void *)key, (void *)id);
ks_hash_insert(bh->identities, (void *)key, (void *)value);
ks_log(KS_LOG_DEBUG, "Route Added: %s through %s\n", key, id);
ks_log(KS_LOG_DEBUG, "Route Added: %s through %s\n", key, value);
// @todo when a route is added, upstream needs to be notified that the identity can be found through the session to the
// upstream router, and likewise up the chain to the Master Router Node, to create a complete route from anywhere else
@@ -814,13 +814,13 @@ KS_DECLARE(ks_status_t) blade_handle_sessions_remove(blade_session_t *bs)
while ((it = ks_hash_first(bh->identities, KS_UNLOCKED))) {
void *key = NULL;
void *value = NULL;
ks_hash_this(it, &key, NULL, &value);
ks_hash_this(it, (const void **)&key, NULL, &value);
ks_hash_remove(bh->identities, key);
}
while ((it = ks_hash_first(bh->realms, KS_UNLOCKED))) {
void *key = NULL;
void *value = NULL;
ks_hash_this(it, &key, NULL, &value);
ks_hash_this(it, (const void **)&key, NULL, &value);
ks_hash_remove(bh->realms, key);
}
ks_pool_free(bh->pool, &bh->upstream_id);
@@ -831,7 +831,7 @@ KS_DECLARE(ks_status_t) blade_handle_sessions_remove(blade_session_t *bs)
blade_session_write_unlock(bs);
return ret;
}
+5 -5
View File
@@ -638,7 +638,7 @@ ks_status_t blade_transport_wss_link_read(blade_transport_wss_link_t *btwssl, cJ
{
// @todo get exact timeout from service config?
int32_t poll_flags = 0;
ks_assert(btwssl);
ks_assert(json);
@@ -768,7 +768,7 @@ blade_connection_state_hook_t blade_transport_wss_onstate_startup_inbound(blade_
// @todo start here for a reusable handler for "blade.connect" request jsonrpc method within transport implementations,
// output 2 parameters for response and error, if an error occurs, send it, otherwise send the response
jsonrpc = cJSON_GetObjectCstr(json_req, "jsonrpc"); // @todo check for definitions of these keys and fixed values
if (!jsonrpc || strcmp(jsonrpc, "2.0")) {
ks_log(KS_LOG_DEBUG, "Received message is not the expected protocol\n");
@@ -852,7 +852,7 @@ blade_connection_state_hook_t blade_transport_wss_onstate_startup_inbound(blade_
void *value = NULL;
char *identity = NULL;
ks_hash_this(it, &key, NULL, &value);
ks_hash_this(it, (const void **)&key, NULL, &value);
identity = ks_psprintf(pool, "%s@%s", sid, (const char *)key);
@@ -900,7 +900,7 @@ blade_connection_state_hook_t blade_transport_wss_onstate_startup_inbound(blade_
void *key = NULL;
void *value = NULL;
ks_hash_this(it, &key, NULL, &value);
ks_hash_this(it, (const void **)&key, NULL, &value);
cJSON_AddItemToArray(json_result_identities, cJSON_CreateString((const char *)key));
}
@@ -919,7 +919,7 @@ blade_connection_state_hook_t blade_transport_wss_onstate_startup_inbound(blade_
void *key = NULL;
void *value = NULL;
ks_hash_this(it, &key, NULL, &value);
ks_hash_this(it, (const void **)&key, NULL, &value);
cJSON_AddItemToArray(json_result_realms, cJSON_CreateString((const char *)key));
}