Commit c8335ee4 authored by Greg Williams's avatar Greg Williams
Browse files

Updated to pass log_level through to client bus logger. Updated to set...

Updated to pass log_level through to client bus logger. Updated to set BUS_SOCKET_SSL if SessionConfig has useSsl set to true. When using SSL mode for a session, admin client is crashing upon send via sender.c SSL_write().
parent 569e2975
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ all: default test system_tests test_internals run examples
clean: makedirs update_git_submodules
	rm -rf ./bin/*.a ./bin/*.so ./bin/kinetic-c-util
	rm -rf ./bin/**/*
	rm ./bin/*.*
	rm -f ./bin/*.*
	rm -f $(OUT_DIR)/*.o $(OUT_DIR)/*.a *.core *.log
	bundle exec rake clobber
	-./vendor/kinetic-simulator/stopSimulator.sh &> /dev/null;
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ KineticClient * KineticClient_Init(const char* log_file, int log_level)
    KineticLogger_Init(log_file, log_level);
    KineticClient * client = KineticCalloc(1, sizeof(*client));
    if (client == NULL) { return NULL; }
    bool success = KineticPDU_InitBus(1, client);
    bool success = KineticPDU_InitBus(log_level, client);
    if (!success)
    {
        KineticFree(client);
+1 −1
Original line number Diff line number Diff line
@@ -688,7 +688,7 @@ void KineticOperation_BuildInstantSecureErase(KineticOperation* operation)
{
    KineticOperation_ValidateOperation(operation);
    KineticSession_IncrementSequence(operation->connection->session);
    operation->request->message.command.header->messageType = KINETIC_PROTO_COMMAND_MESSAGE_TYPE_SETUP;
    operation->request->message.command.header->messageType = KINETIC_PROTO_COMMAND_MESSAGE_TYPE_PINOP;
    operation->request->message.command.header->has_messageType = true;
    operation->request->command->body = &operation->request->message.body;
    operation->request->command->body->pinOp = &operation->request->message.pinOp;
+1 −1
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ bool KineticPDU_InitBus(int log_level, KineticClient * client)
{
    bus_config cfg = {
        .log_cb = log_cb,
        .log_level = (log_level > 1) ? 1 : 0,
        .log_level = log_level,
        .sink_cb = sink_cb,
        .unpack_cb = unpack_cb,
        .unexpected_msg_cb = KineticController_HandleUnexecpectedResponse,
+2 −2
Original line number Diff line number Diff line
@@ -98,10 +98,10 @@ KineticStatus KineticSession_Connect(KineticSession * const session)
        return KINETIC_STATUS_CONNECTION_ERROR;
    }


    bus_socket_t socket_type = session->config.useSsl ? BUS_SOCKET_SSL : BUS_SOCKET_PLAIN;
    connection->si = calloc(1, sizeof(socket_info) + 2 * PDU_PROTO_MAX_LEN);
    if (connection->si == NULL) { return KINETIC_STATUS_MEMORY_ERROR; }
    bool success = bus_register_socket(connection->messageBus, BUS_SOCKET_PLAIN, connection->socket, connection);
    bool success = bus_register_socket(connection->messageBus, socket_type, connection->socket, connection);
    if (!success) {
        free(connection->si);
        return KINETIC_STATUS_SESSION_INVALID;
Loading