From 26fe5aba6b867357fbee474406686b664b9683a1 Mon Sep 17 00:00:00 2001 From: elong Date: Tue, 13 Oct 2015 11:03:53 -0400 Subject: [PATCH] fix some compile errors --- symmetric-client-clib/inc/core/SymEngine.h | 2 +- symmetric-client-clib/inc/service/DataExtractorService.h | 2 ++ symmetric-client-clib/inc/service/OutgoingBatchService.h | 1 + symmetric-client-clib/inc/transport/TransportManager.h | 1 - .../inc/transport/http/HttpOutgoingTransport.h | 1 + symmetric-client-clib/src/service/OutgoingBatchService.c | 6 +++--- .../src/transport/http/HttpOutgoingTransport.c | 4 ++++ .../src/transport/http/HttpTransportManager.c | 5 ----- symmetric-client-clib/src/util/Map.c | 6 ++++-- 9 files changed, 16 insertions(+), 12 deletions(-) diff --git a/symmetric-client-clib/inc/core/SymEngine.h b/symmetric-client-clib/inc/core/SymEngine.h index a405fa9e03..1b0593679c 100644 --- a/symmetric-client-clib/inc/core/SymEngine.h +++ b/symmetric-client-clib/inc/core/SymEngine.h @@ -58,7 +58,7 @@ typedef struct SymEngine { SymPullService *pullService; SymNodeService *nodeService; SymIncomingBatchService *incomingBatchService; - SymIncomingBatchService *outgoingBatchService; + SymOutgoingBatchService *outgoingBatchService; SymConfigurationService *configurationService; unsigned short (*start)(struct SymEngine *this); diff --git a/symmetric-client-clib/inc/service/DataExtractorService.h b/symmetric-client-clib/inc/service/DataExtractorService.h index 5231321bc2..4bc63cea95 100644 --- a/symmetric-client-clib/inc/service/DataExtractorService.h +++ b/symmetric-client-clib/inc/service/DataExtractorService.h @@ -31,4 +31,6 @@ typedef struct SymDataExtractorService { void (*destroy)(struct SymDataExtractorService *this); } SymDataExtractorService; +SymDataExtractorService * SymDataExtractorService_new(SymDataExtractorService *this); + #endif diff --git a/symmetric-client-clib/inc/service/OutgoingBatchService.h b/symmetric-client-clib/inc/service/OutgoingBatchService.h index 56ff7042d8..ccc7e4f361 100644 --- a/symmetric-client-clib/inc/service/OutgoingBatchService.h +++ b/symmetric-client-clib/inc/service/OutgoingBatchService.h @@ -24,6 +24,7 @@ #include #include #include "model/OutgoingBatch.h" +#include "db/platform/DatabasePlatform.h" #include "util/List.h" typedef struct SymOutgoingBatchService { diff --git a/symmetric-client-clib/inc/transport/TransportManager.h b/symmetric-client-clib/inc/transport/TransportManager.h index 13cbf62cc8..065915c3a3 100644 --- a/symmetric-client-clib/inc/transport/TransportManager.h +++ b/symmetric-client-clib/inc/transport/TransportManager.h @@ -35,7 +35,6 @@ typedef struct SymTransportManager { SymParameterService *parameterService; int (*sendAcknowledgement)(struct SymTransportManager *this, SymNode *remote, SymList *batches, SymNode *local, char *securityToken, char *registrationUrl); - SymBatchAck ** (*readAcknowledgement)(struct SymTransportManager *this, char *parameterString1, char *parameterString2); SymIncomingTransport * (*getPullTransport)(struct SymTransportManager *this, SymNode *remote, SymNode *local, char *securityToken, SymProperties *requestProperties, char *registrationUrl); SymOutgoingTransport * (*getPushTransport)(struct SymTransportManager *this, SymNode *remote, SymNode *local, char *securityToken, char *registrationUrl); SymIncomingTransport * (*getRegisterTransport)(struct SymTransportManager *this, SymNode *local, char *registrationUrl); diff --git a/symmetric-client-clib/inc/transport/http/HttpOutgoingTransport.h b/symmetric-client-clib/inc/transport/http/HttpOutgoingTransport.h index 735a5e336c..87fae068d7 100644 --- a/symmetric-client-clib/inc/transport/http/HttpOutgoingTransport.h +++ b/symmetric-client-clib/inc/transport/http/HttpOutgoingTransport.h @@ -24,6 +24,7 @@ #include #include #include "transport/OutgoingTransport.h" +#include "util/List.h" typedef struct SymHttpOutgoingTransport { SymOutgoingTransport super; diff --git a/symmetric-client-clib/src/service/OutgoingBatchService.c b/symmetric-client-clib/src/service/OutgoingBatchService.c index 41e1d8f691..b5780a0f74 100644 --- a/symmetric-client-clib/src/service/OutgoingBatchService.c +++ b/symmetric-client-clib/src/service/OutgoingBatchService.c @@ -21,7 +21,7 @@ #include "service/OutgoingBatchService.h" #include "common/Log.h" -SymOutgoingBatch SymOutgoingBatchService_outgoingBatchMapper(SymRow *row) { +SymOutgoingBatch * SymOutgoingBatchService_outgoingBatchMapper(SymRow *row) { SymOutgoingBatch *batch = SymOutgoingBatch_new(NULL); batch->nodeId = row->getStringNew(row, "node_id"); batch->status = row->getStringNew(row, "status"); @@ -66,7 +66,7 @@ void SymOutgoingBatchService_insertOutgoingBatch(SymOutgoingBatchService *this, args->addLong(args, batch->batchId)->add(args, batch->nodeId)->add(args, batch->channelId); args->add(args, batch->status)->addInt(args, batch->loadId)->addInt(args, batch->extractJobFlag); args->addInt(args, batch->loadFlag)->addInt(args, batch->commonFlag)->addLong(args, batch->reloadEventCount); - args->add(args, batch->otherEventCount)->add(args, batch->lastUpdatedHostName)->add(args, batch->createBy); + args->addLong(args, batch->otherEventCount)->add(args, batch->lastUpdatedHostName)->add(args, batch->createBy); SymSqlTemplate *sqlTemplate = this->platform->getSqlTemplate(this->platform); int error; @@ -81,7 +81,7 @@ SymOutgoingBatch * SymOutgoingBatchService_findOutgoingBatch(SymOutgoingBatchSer args->add(args, nodeId); SymSqlTemplate *sqlTemplate = this->platform->getSqlTemplate(this->platform); - SymStringBuilder sb = SymStringBuilder_newWithString(SYM_SQL_SELECT_OUTGOING_BATCH_PREFIX); + SymStringBuilder *sb = SymStringBuilder_newWithString(SYM_SQL_SELECT_OUTGOING_BATCH_PREFIX); sb->append(sb, SYM_SQL_FIND_OUTGOING_BATCH); int error; SymList *batches = sqlTemplate->query(sqlTemplate, sb->str, args, NULL, &error, (void *) SymOutgoingBatchService_outgoingBatchMapper); diff --git a/symmetric-client-clib/src/transport/http/HttpOutgoingTransport.c b/symmetric-client-clib/src/transport/http/HttpOutgoingTransport.c index 21ea3c6c52..c0d1042412 100644 --- a/symmetric-client-clib/src/transport/http/HttpOutgoingTransport.c +++ b/symmetric-client-clib/src/transport/http/HttpOutgoingTransport.c @@ -20,6 +20,10 @@ */ #include "transport/http/HttpOutgoingTransport.h" +SymList * SymHttpOutgoingTransport_readAcks(SymHttpOutgoingTransport *this) { + return NULL; +} + void SymHttpOutgoingTransport_destroy(SymHttpOutgoingTransport *this) { free(this->url); free(this); diff --git a/symmetric-client-clib/src/transport/http/HttpTransportManager.c b/symmetric-client-clib/src/transport/http/HttpTransportManager.c index 027639af7f..1a637994a9 100644 --- a/symmetric-client-clib/src/transport/http/HttpTransportManager.c +++ b/symmetric-client-clib/src/transport/http/HttpTransportManager.c @@ -124,10 +124,6 @@ int SymHttpTransportManager_sendAcknowledgement(SymHttpTransportManager *this, S return httpResponseCode; } -SymBatchAck * SymHttpTransportManager_readAcknowledgement(SymHttpTransportManager *this, char *parameterString1, char *parameterString2) { - return NULL; -} - SymHttpIncomingTransport * SymHttpTransportManager_getPullTransport(SymHttpTransportManager *this, SymNode *remote, SymNode *local, char *securityToken, SymProperties *requestProperties, char *registrationUrl) { return SymHttpIncomingTransport_new(NULL, buildUrl("pull", remote, local, securityToken, registrationUrl)); } @@ -150,7 +146,6 @@ SymHttpTransportManager * SymHttpTransportManager_new(SymHttpTransportManager *t } SymTransportManager *super = &this->super; super->sendAcknowledgement = (void *) &SymHttpTransportManager_sendAcknowledgement; - super->readAcknowledgement = (void *) &SymHttpTransportManager_readAcknowledgement; super->getPullTransport = (void *) &SymHttpTransportManager_getPullTransport; super->getPushTransport = (void *) &SymHttpTransportManager_getPushTransport; super->getRegisterTransport = (void *) &SymHttpTransportManager_getRegisterTransport; diff --git a/symmetric-client-clib/src/util/Map.c b/symmetric-client-clib/src/util/Map.c index c87930a52e..c323c6bd28 100644 --- a/symmetric-client-clib/src/util/Map.c +++ b/symmetric-client-clib/src/util/Map.c @@ -108,7 +108,8 @@ void * SymMap_get(SymMap *this, char *key) { SymStringArray * SymMap_keys(SymMap *this) { SymList *entries = this->entries(this); SymStringArray *keys = SymStringArray_new(NULL); - for (int i = 0; i < entries->size; i++) { + int i; + for (i = 0; i < entries->size; i++) { keys->add(keys, ((SymMapEntry *)entries->get(entries, i))->key); } @@ -118,7 +119,8 @@ SymStringArray * SymMap_keys(SymMap *this) { SymList * SymMap_values(SymMap *this) { SymList *entries = this->entries(this); SymList *values = SymList_new(NULL); - for (int i = 0; i < entries->size; i++) { + int i; + for (i = 0; i < entries->size; i++) { values->add(values, ((SymMapEntry *)entries->get(entries, i))->value); }