Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix some compile errors
  • Loading branch information
erilong committed Oct 13, 2015
1 parent ad9be7f commit 26fe5ab
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion symmetric-client-clib/inc/core/SymEngine.h
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions symmetric-client-clib/inc/service/DataExtractorService.h
Expand Up @@ -31,4 +31,6 @@ typedef struct SymDataExtractorService {
void (*destroy)(struct SymDataExtractorService *this);
} SymDataExtractorService;

SymDataExtractorService * SymDataExtractorService_new(SymDataExtractorService *this);

#endif
1 change: 1 addition & 0 deletions symmetric-client-clib/inc/service/OutgoingBatchService.h
Expand Up @@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "model/OutgoingBatch.h"
#include "db/platform/DatabasePlatform.h"
#include "util/List.h"

typedef struct SymOutgoingBatchService {
Expand Down
1 change: 0 additions & 1 deletion symmetric-client-clib/inc/transport/TransportManager.h
Expand Up @@ -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);
Expand Down
Expand Up @@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "transport/OutgoingTransport.h"
#include "util/List.h"

typedef struct SymHttpOutgoingTransport {
SymOutgoingTransport super;
Expand Down
6 changes: 3 additions & 3 deletions symmetric-client-clib/src/service/OutgoingBatchService.c
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Expand Up @@ -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);
Expand Down
Expand Up @@ -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));
}
Expand All @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions symmetric-client-clib/src/util/Map.c
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 26fe5ab

Please sign in to comment.