Commit 6c96538c authored by Greg Williams's avatar Greg Williams
Browse files

Fixed kinetic entry buffer sync issues and re-enabled tests

parent c55b7454
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@
#ifndef LOG_FILE_NAME_MAX
#define LOG_FILE_NAME_MAX (HOST_NAME_MAX)
#endif

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

/**
 * @brief Enumeration of encryption/checksum key algorithms
 */
+4 −2
Original line number Diff line number Diff line
@@ -62,11 +62,13 @@ static KineticStatus KineticClient_CreateOperation(

static KineticStatus KineticClient_ExecuteOperation(KineticOperation* operation)
{
    assert(operation != NULL);
    KineticStatus status = KINETIC_STATUS_INVALID;

    LOGF1("Executing operation: 0x%llX", operation);
    if (operation->destEntry->value.array.data != NULL
        && operation->destEntry->value.bytesUsed > 0)
    if (operation->destEntry != NULL &&
        operation->destEntry->value.array.data != NULL &&
        operation->destEntry->value.bytesUsed > 0)
    {
        LOGF1("  Sending PDU (0x%0llX) w/value (%zu bytes)",
            operation->request, operation->destEntry->value.bytesUsed);
+7 −1
Original line number Diff line number Diff line
@@ -66,7 +66,13 @@ KineticStatus KineticOperation_SendRequest(KineticOperation* const operation)
    // Configure PDU header length fields
    request->header.versionPrefix = 'F';
    request->header.protobufLength = KineticProto_Message__get_packed_size(request->proto);
    request->header.valueLength = (operation->sendValue) ? operation->destEntry->value.bytesUsed : 0;
    if (operation->destEntry != NULL && operation->sendValue) {
        request->header.valueLength = operation->destEntry->value.bytesUsed;
    }
    else
    {
        request->header.valueLength = 0;
    }
    KineticLogger_LogHeader(1, &request->header);

    // Create NBO copy of header for sending
+0 −2
Original line number Diff line number Diff line
@@ -48,8 +48,6 @@
#define STATIC static
#endif

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


typedef struct _KineticPDU KineticPDU;
typedef struct _KineticOperation KineticOperation;
+3 −3
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ KineticStatus ExecuteOperation(
    }

    else if (strcmp("put", operation) == 0) {
        status = KineticClient_Put(sessionHandle, entry);
        status = KineticClient_Put(sessionHandle, entry, NULL);
        if (status == KINETIC_STATUS_SUCCESS) {
            printf("\nPut operation completed successfully."
                   " Your data has been stored!\n\n");
@@ -118,7 +118,7 @@ KineticStatus ExecuteOperation(
    }

    else if (strcmp("get", operation) == 0) {
        status = KineticClient_Get(sessionHandle, entry);
        status = KineticClient_Get(sessionHandle, entry, NULL);
        if (status == 0) {
            printf("\nGet executed successfully."
                   "The entry has been retrieved!\n\n");
@@ -126,7 +126,7 @@ KineticStatus ExecuteOperation(
    }

    else if (strcmp("delete", operation) == 0) {
        status = KineticClient_Delete(sessionHandle, entry);
        status = KineticClient_Delete(sessionHandle, entry, NULL);
        if (status == 0) {
            printf("\nDelete executed successfully."
                   " The entry has been destroyed!\n\n");
Loading