FS-10167: Fixing linux build for blade.broadcast related stuff
This commit is contained in:
parent
e931137444
commit
9cb5652d14
|
@ -13,7 +13,7 @@ libunqlite_la_LIBADD = -lpthread
|
||||||
lib_LTLIBRARIES = libblade.la
|
lib_LTLIBRARIES = libblade.la
|
||||||
libblade_la_SOURCES = src/blade.c src/blade_stack.c
|
libblade_la_SOURCES = src/blade.c src/blade_stack.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_identity.c src/blade_rpc.c src/blade_connection.c src/blade_session.c
|
||||||
libblade_la_SOURCES += src/blade_protocol.c
|
libblade_la_SOURCES += src/blade_protocol.c src/blade_subscription.c
|
||||||
libblade_la_SOURCES += src/blade_transport.c src/blade_transport_wss.c
|
libblade_la_SOURCES += src/blade_transport.c src/blade_transport_wss.c
|
||||||
|
|
||||||
libblade_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
libblade_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||||
|
@ -23,7 +23,7 @@ libblade_la_LIBADD = libunqlite.la
|
||||||
library_includedir = $(prefix)/include
|
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.h src/include/blade_types.h src/include/blade_stack.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_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
|
library_include_HEADERS += src/include/blade_protocol.h src/include/blade_subscription.h
|
||||||
library_include_HEADERS += src/include/blade_transport.h src/include/blade_transport_wss.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
|
library_include_HEADERS += src/include/unqlite.h test/tap.h
|
||||||
|
|
||||||
|
|
|
@ -1990,7 +1990,7 @@ KS_DECLARE(ks_status_t) blade_protocol_subscribe(blade_handle_t *bh, const char
|
||||||
ret = KS_STATUS_DISCONNECTED;
|
ret = KS_STATUS_DISCONNECTED;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (remove) {
|
if (remove) {
|
||||||
propagate = blade_handle_subscriber_remove(bh, &bsub, event, protocol, realm, bh->local_nodeid);
|
propagate = blade_handle_subscriber_remove(bh, &bsub, event, protocol, realm, bh->local_nodeid);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2193,7 +2193,7 @@ KS_DECLARE(ks_status_t) blade_protocol_broadcast_raw(blade_handle_t *bh, const c
|
||||||
cJSON *req = NULL;
|
cJSON *req = NULL;
|
||||||
cJSON *req_params = NULL;
|
cJSON *req_params = NULL;
|
||||||
|
|
||||||
ks_hash_this(it, &key, NULL, &value);
|
ks_hash_this(it, (const void **)&key, NULL, &value);
|
||||||
|
|
||||||
if (excluded_nodeid && !ks_safe_strcasecmp(excluded_nodeid, (const char *)key)) continue;
|
if (excluded_nodeid && !ks_safe_strcasecmp(excluded_nodeid, (const char *)key)) continue;
|
||||||
|
|
||||||
|
@ -2311,7 +2311,7 @@ ks_bool_t blade_protocol_broadcast_request_handler(blade_rpc_request_t *brpcreq,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
req_params_params = cJSON_GetObjectCstr(req_params, "params");
|
req_params_params = cJSON_GetObjectItem(req_params, "params");
|
||||||
|
|
||||||
|
|
||||||
blade_protocol_broadcast_raw(bh, blade_session_id_get(bs), req_params_event, req_params_protocol, req_params_realm, req_params_params, NULL, NULL);
|
blade_protocol_broadcast_raw(bh, blade_session_id_get(bs), req_params_event, req_params_protocol, req_params_realm, req_params_params, NULL, NULL);
|
||||||
|
@ -2324,7 +2324,7 @@ ks_bool_t blade_protocol_broadcast_request_handler(blade_rpc_request_t *brpcreq,
|
||||||
bsub = (blade_subscription_t *)ks_hash_search(bh->subscriptions, (void *)bsub_key, KS_UNLOCKED);
|
bsub = (blade_subscription_t *)ks_hash_search(bh->subscriptions, (void *)bsub_key, KS_UNLOCKED);
|
||||||
if (bsub) {
|
if (bsub) {
|
||||||
ks_rwl_read_lock(bh->local_nodeid_rwl);
|
ks_rwl_read_lock(bh->local_nodeid_rwl);
|
||||||
if (ks_hash_search(blade_subscription_subscribers_get(bsub), bh->local_nodeid, KS_UNLOCKED)) {
|
if (ks_hash_search(blade_subscription_subscribers_get(bsub), (void *)bh->local_nodeid, KS_UNLOCKED)) {
|
||||||
callback = blade_subscription_callback_get(bsub);
|
callback = blade_subscription_callback_get(bsub);
|
||||||
if (callback) ret = callback(brpcreq, blade_subscription_callback_data_get(bsub));
|
if (callback) ret = callback(brpcreq, blade_subscription_callback_data_get(bsub));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue