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

Cleaned up unused/undocumented type info

parent 7b1e7fc0
Loading
Loading
Loading
Loading
+9 −16
Original line number Diff line number Diff line
@@ -36,16 +36,15 @@
#include "byte_array.h"


#define KINETIC_HANDLE_INVALID  (0)
#define KINETIC_PORT            (8123)
#define KINETIC_TLS_PORT        (8443)
#define KINETIC_HMAC_SHA1_LEN   (SHA_DIGEST_LENGTH)
#define KINETIC_HMAC_MAX_LEN    (KINETIC_HMAC_SHA1_LEN)
#define KINETIC_PIN_MAX_LEN     (1024)
#define KINETIC_DEFAULT_KEY_LEN (1024)
#define KINETIC_MAX_KEY_LEN     (4096)
#define KINETIC_MAX_VERSION_LEN (256)
#define KINETIC_OBJ_SIZE        (1024 * 1024)
#define KINETIC_SOCKET_INVALID  (-1)                    ///< Invalid socket file descriptor value
#define KINETIC_PORT            (8123)                  ///< Default kinetic port 
#define KINETIC_TLS_PORT        (8443)                  ///< Default kinetic TLS port
#define KINETIC_HMAC_SHA1_LEN   (SHA_DIGEST_LENGTH)     ///< HMAC secure hash length
#define KINETIC_HMAC_MAX_LEN    (KINETIC_HMAC_SHA1_LEN) ///< HMAC max length
#define KINETIC_PIN_MAX_LEN     (1024)                  ///< Max PIN length
#define KINETIC_DEFAULT_KEY_LEN (1024)                  ///< Default key length
#define KINETIC_MAX_KEY_LEN     (4096)                  ///< Max key length
#define KINETIC_OBJ_SIZE        (1024 * 1024)           ///< Max object/value size

// Define max host name length
// Some Linux environments require this, although not all, but it's benign.
@@ -58,10 +57,6 @@
#define HOST_NAME_MAX 256
#endif // HOST_NAME_MAX

#ifndef LOG_FILE_NAME_MAX
#define LOG_FILE_NAME_MAX (HOST_NAME_MAX)
#endif

#define BOOL_TO_STRING(_bool) (_bool) ? "true" : "false"

/**
@@ -467,6 +462,4 @@ typedef struct {
 */
const char* KineticMessageType_GetName(KineticMessageType type);

#define KINETIC_DEVICE_INFO_SCRATCH_BUF_LEN (1024 * 1024 * 4) // Will get reallocated to actual/used size post-copy

#endif // _KINETIC_TYPES_H
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ KineticSession* KineticAllocator_NewSession(struct bus * b, KineticSessionConfig
    session->timeoutSeconds = config->timeoutSeconds; // TODO: Eliminate this, since already in config?
    KineticResourceWaiter_Init(&session->connectionReady);
    session->messageBus = b;
    session->socket = -1;  // start with an invalid file descriptor
    session->socket = KINETIC_SOCKET_INVALID;

    return session;
}
+0 −18
Original line number Diff line number Diff line
@@ -31,24 +31,6 @@
#include <pthread.h>
#include "bus.h"

KineticOperation* KineticController_CreateOperation(KineticSession * const session)
{
    if (session == NULL) {
        LOG0("Specified session is NULL");
        return NULL;
    }

    LOGF3("--------------------------------------------------\n"
         "Building new operation on session @ 0x%llX", session);

    KineticOperation* operation = KineticAllocator_NewOperation(session);
    if (operation == NULL || operation->request == NULL) {
        return NULL;
    }

    return operation;
}

typedef struct {
    pthread_mutex_t receiveCompleteMutex;
    pthread_cond_t receiveComplete;
+2 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ KineticStatus KineticSession_Create(KineticSession * const session, KineticClien
    }

    session->connected = false;
    session->socket = -1;
    session->socket = KINETIC_SOCKET_INVALID;
    
    // initialize session send mutex
    if (pthread_mutex_init(&session->sendMutex, NULL) != 0) {
@@ -141,7 +141,7 @@ KineticStatus KineticSession_Disconnect(KineticSession * const session)
    bus_release_socket(session->messageBus, session->socket, NULL);
    free(session->si);
    session->si = NULL;
    session->socket = KINETIC_HANDLE_INVALID;
    session->socket = KINETIC_SOCKET_INVALID;
    session->connected = false;
    pthread_mutex_destroy(&session->sendMutex);