Loading Makefile +2 −1 Original line number Diff line number Diff line Loading @@ -10,8 +10,9 @@ PUB_INC = ./include #=============================================================================== CC ?= gcc OPTIMIZE = -O3 SYSTEM_TEST_HOST ?= \"localhost\" WARN = -Wall -Wextra -Wstrict-prototypes -Wcast-align -pedantic -Wno-missing-field-initializers CDEFS += -D_POSIX_C_SOURCE=199309L -D_C99_SOURCE=1 CDEFS += -D_POSIX_C_SOURCE=199309L -D_C99_SOURCE=1 -DSYSTEM_TEST_HOST=${SYSTEM_TEST_HOST} CFLAGS += -std=c99 -fPIC -g $(WARN) $(CDEFS) $(OPTIMIZE) LDFLAGS += -lm -lcrypto -lssl -lpthread Loading Rakefile +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ compiler = ENV.fetch('CC', 'gcc') compiler_location = `which #{compiler}`.strip compiler_info = `#{compiler} --version 2>&1`.strip SYSTEM_TEST_HOST = ENV.fetch('SYSTEM_TEST_HOST', "localhost") task :report_toolchain do report_banner("Toolchain Configuration") Loading config/project.yml +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ :defines: :commmon: &common_defines - TEST - SYSTEM_TEST_HOST=\"<%= ENV.fetch('SYSTEM_TEST_HOST', 'localhost') %>\" :test: - *common_defines :test_preprocess: Loading include/kinetic_client.h +9 −9 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ KineticStatus KineticClient_NoOp(KineticSessionHandle handle); * specify the data to be stored. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -95,7 +95,7 @@ KineticStatus KineticClient_Put(KineticSessionHandle handle, * @param handle KineticSessionHandle for a connected session. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -110,7 +110,7 @@ KineticStatus KineticClient_Flush(KineticSessionHandle handle, * be populated unless 'metadataOnly' is set to 'true'. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -130,7 +130,7 @@ KineticStatus KineticClient_Get(KineticSessionHandle handle, * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -150,7 +150,7 @@ KineticStatus KineticClient_GetPrevious(KineticSessionHandle handle, * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -166,7 +166,7 @@ KineticStatus KineticClient_GetNext(KineticSessionHandle handle, * not used for this operation. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -183,7 +183,7 @@ KineticStatus KineticClient_Delete(KineticSessionHandle handle, * @param keys ByteBufferArray to store the retrieved keys * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * * @return Returns 0 upon success, -1 or the Kinetic status code Loading @@ -204,7 +204,7 @@ KineticStatus KineticClient_GetKeyRange(KineticSessionHandle handle, * the requested data, if successful. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns 0 upon success, -1 or the Kinetic status code * upon failure Loading @@ -224,7 +224,7 @@ KineticStatus KineticClient_GetLog(KineticSessionHandle handle, * this structure. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns 0 upon success, -1 or the Kinetic status code * upon failure. Note that P2P operations can be nested. This Loading src/lib/kinetic_operation.c +22 −21 Original line number Diff line number Diff line Loading @@ -561,27 +561,28 @@ void KineticOperation_BuildP2POperation(KineticOperation* const operation, KineticProto_Command_P2POperation_Operation * p2p_op_op = calloc(1, sizeof(KineticProto_Command_P2POperation_Operation)); assert(p2p_op_op != NULL); (*p2p_op_op) = (KineticProto_Command_P2POperation_Operation){ .has_key = true, .key.data = p2pOp->operations[i].key.array.data, .key.len = p2pOp->operations[i].key.bytesUsed, KineticProto_command_p2_poperation_operation__init(p2p_op_op); .has_newKey = !ByteBuffer_IsNull(p2pOp->operations[i].newKey), .newKey.data = p2pOp->operations[i].newKey.array.data, .newKey.len = p2pOp->operations[i].newKey.bytesUsed, p2p_op_op->has_key = true; p2p_op_op->key.data = p2pOp->operations[i].key.array.data; p2p_op_op->key.len = p2pOp->operations[i].key.bytesUsed; .has_version = !ByteBuffer_IsNull(p2pOp->operations[i].version), .version.data = p2pOp->operations[i].version.array.data, .version.len = p2pOp->operations[i].version.bytesUsed, p2p_op_op->has_newKey = !ByteBuffer_IsNull(p2pOp->operations[i].newKey); p2p_op_op->newKey.data = p2pOp->operations[i].newKey.array.data; p2p_op_op->newKey.len = p2pOp->operations[i].newKey.bytesUsed; p2p_op_op->has_version = !ByteBuffer_IsNull(p2pOp->operations[i].version); p2p_op_op->version.data = p2pOp->operations[i].version.array.data; p2p_op_op->version.len = p2pOp->operations[i].version.bytesUsed; // force if no version was specified .has_force = ByteBuffer_IsNull(p2pOp->operations[i].version), .force = ByteBuffer_IsNull(p2pOp->operations[i].version), p2p_op_op->has_force = ByteBuffer_IsNull(p2pOp->operations[i].version); p2p_op_op->force = ByteBuffer_IsNull(p2pOp->operations[i].version); // no nesting for now .p2pop = NULL, .status = NULL, }; p2p_op_op->p2pop = NULL; p2p_op_op->status = NULL; operation->request->command->body->p2pOperation->operation[i] = p2p_op_op; } Loading Loading
Makefile +2 −1 Original line number Diff line number Diff line Loading @@ -10,8 +10,9 @@ PUB_INC = ./include #=============================================================================== CC ?= gcc OPTIMIZE = -O3 SYSTEM_TEST_HOST ?= \"localhost\" WARN = -Wall -Wextra -Wstrict-prototypes -Wcast-align -pedantic -Wno-missing-field-initializers CDEFS += -D_POSIX_C_SOURCE=199309L -D_C99_SOURCE=1 CDEFS += -D_POSIX_C_SOURCE=199309L -D_C99_SOURCE=1 -DSYSTEM_TEST_HOST=${SYSTEM_TEST_HOST} CFLAGS += -std=c99 -fPIC -g $(WARN) $(CDEFS) $(OPTIMIZE) LDFLAGS += -lm -lcrypto -lssl -lpthread Loading
Rakefile +1 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ compiler = ENV.fetch('CC', 'gcc') compiler_location = `which #{compiler}`.strip compiler_info = `#{compiler} --version 2>&1`.strip SYSTEM_TEST_HOST = ENV.fetch('SYSTEM_TEST_HOST', "localhost") task :report_toolchain do report_banner("Toolchain Configuration") Loading
config/project.yml +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ :defines: :commmon: &common_defines - TEST - SYSTEM_TEST_HOST=\"<%= ENV.fetch('SYSTEM_TEST_HOST', 'localhost') %>\" :test: - *common_defines :test_preprocess: Loading
include/kinetic_client.h +9 −9 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ KineticStatus KineticClient_NoOp(KineticSessionHandle handle); * specify the data to be stored. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -95,7 +95,7 @@ KineticStatus KineticClient_Put(KineticSessionHandle handle, * @param handle KineticSessionHandle for a connected session. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -110,7 +110,7 @@ KineticStatus KineticClient_Flush(KineticSessionHandle handle, * be populated unless 'metadataOnly' is set to 'true'. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -130,7 +130,7 @@ KineticStatus KineticClient_Get(KineticSessionHandle handle, * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -150,7 +150,7 @@ KineticStatus KineticClient_GetPrevious(KineticSessionHandle handle, * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -166,7 +166,7 @@ KineticStatus KineticClient_GetNext(KineticSessionHandle handle, * not used for this operation. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns the resulting KineticStatus. */ Loading @@ -183,7 +183,7 @@ KineticStatus KineticClient_Delete(KineticSessionHandle handle, * @param keys ByteBufferArray to store the retrieved keys * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * * @return Returns 0 upon success, -1 or the Kinetic status code Loading @@ -204,7 +204,7 @@ KineticStatus KineticClient_GetKeyRange(KineticSessionHandle handle, * the requested data, if successful. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns 0 upon success, -1 or the Kinetic status code * upon failure Loading @@ -224,7 +224,7 @@ KineticStatus KineticClient_GetLog(KineticSessionHandle handle, * this structure. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion. * will be called upon completion in another thread. * * @return Returns 0 upon success, -1 or the Kinetic status code * upon failure. Note that P2P operations can be nested. This Loading
src/lib/kinetic_operation.c +22 −21 Original line number Diff line number Diff line Loading @@ -561,27 +561,28 @@ void KineticOperation_BuildP2POperation(KineticOperation* const operation, KineticProto_Command_P2POperation_Operation * p2p_op_op = calloc(1, sizeof(KineticProto_Command_P2POperation_Operation)); assert(p2p_op_op != NULL); (*p2p_op_op) = (KineticProto_Command_P2POperation_Operation){ .has_key = true, .key.data = p2pOp->operations[i].key.array.data, .key.len = p2pOp->operations[i].key.bytesUsed, KineticProto_command_p2_poperation_operation__init(p2p_op_op); .has_newKey = !ByteBuffer_IsNull(p2pOp->operations[i].newKey), .newKey.data = p2pOp->operations[i].newKey.array.data, .newKey.len = p2pOp->operations[i].newKey.bytesUsed, p2p_op_op->has_key = true; p2p_op_op->key.data = p2pOp->operations[i].key.array.data; p2p_op_op->key.len = p2pOp->operations[i].key.bytesUsed; .has_version = !ByteBuffer_IsNull(p2pOp->operations[i].version), .version.data = p2pOp->operations[i].version.array.data, .version.len = p2pOp->operations[i].version.bytesUsed, p2p_op_op->has_newKey = !ByteBuffer_IsNull(p2pOp->operations[i].newKey); p2p_op_op->newKey.data = p2pOp->operations[i].newKey.array.data; p2p_op_op->newKey.len = p2pOp->operations[i].newKey.bytesUsed; p2p_op_op->has_version = !ByteBuffer_IsNull(p2pOp->operations[i].version); p2p_op_op->version.data = p2pOp->operations[i].version.array.data; p2p_op_op->version.len = p2pOp->operations[i].version.bytesUsed; // force if no version was specified .has_force = ByteBuffer_IsNull(p2pOp->operations[i].version), .force = ByteBuffer_IsNull(p2pOp->operations[i].version), p2p_op_op->has_force = ByteBuffer_IsNull(p2pOp->operations[i].version); p2p_op_op->force = ByteBuffer_IsNull(p2pOp->operations[i].version); // no nesting for now .p2pop = NULL, .status = NULL, }; p2p_op_op->p2pop = NULL; p2p_op_op->status = NULL; operation->request->command->body->p2pOperation->operation[i] = p2p_op_op; } Loading