Commit 5c24db2e authored by Greg Williams's avatar Greg Williams Committed by Scott Vokes
Browse files

Cleaned up unused/undocumented type info

parent 127915c4
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"

/**
@@ -469,6 +464,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 −2
Original line number Diff line number Diff line
@@ -46,8 +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->terminationStatus = KINETIC_STATUS_SUCCESS;
    session->socket = KINETIC_SOCKET_INVALID;  // start with an invalid file descriptor

    return session;
}
+8 −1
Original line number Diff line number Diff line
@@ -31,7 +31,14 @@
#include <pthread.h>
#include "bus.h"

STATIC void DefaultCallback(KineticCompletionData* kinetic_data, void* client_data)
typedef struct {
    pthread_mutex_t receiveCompleteMutex;
    pthread_cond_t receiveComplete;
    bool completed;
    KineticStatus status;
} DefaultCallbackData;

static void DefaultCallback(KineticCompletionData* kinetic_data, void* client_data)
{
    DefaultCallbackData * data = client_data;
    pthread_mutex_lock(&data->receiveCompleteMutex);
+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);