X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=version2%2Fsrc%2FC%2FCloudComm.cc;h=b91fa4ad45d0542c2eb3fc1bbbccb14ea27a34ee;hb=e8add21403bd6e29530a399f1ec8209f14e03623;hp=4e4000fae9ee310be4836cbb3b83a021ef902005;hpb=25a3da33ee1648fa13408c12564a54eb7c0ee3a7;p=iotcloud.git diff --git a/version2/src/C/CloudComm.cc b/version2/src/C/CloudComm.cc index 4e4000f..b91fa4a 100644 --- a/version2/src/C/CloudComm.cc +++ b/version2/src/C/CloudComm.cc @@ -32,7 +32,7 @@ CloudComm::CloudComm() : { } -void * threadWrapper(void * cloud) { +void *threadWrapper(void *cloud) { CloudComm *c = (CloudComm *) cloud; c->localServerWorkerFunction(); return NULL; @@ -63,10 +63,10 @@ CloudComm::CloudComm(Table *_table, IoTString *_baseurl, IoTString *_password, */ AESKey *CloudComm::initKey() { try { - AESKey * key = new AESKey(password->internalBytes(), - salt, - 65536, - 128); + AESKey *key = new AESKey(password->internalBytes(), + salt, + 65536, + 128); return key; } catch (Exception *e) { throw new Error("Failed generating key."); @@ -146,7 +146,7 @@ void readSocketData(int fd, Array *data) {} void writeURLData(int fd, Array *data) { } -void readURLData(int fd, Array * output) { +void readURLData(int fd, Array *output) { } int readURLInt(int fd) { @@ -195,7 +195,7 @@ void CloudComm::setSalt() { bool CloudComm::getSalt() { int fd = -1; IoTString *urlstr = NULL; - + try { char *buffer = (char *) malloc(baseurl->length() + 100); memcpy(buffer, baseurl->internalBytes(), baseurl->length()); @@ -245,11 +245,11 @@ Array *CloudComm::createIV(int64_t machineId, int64_t localSequenceNumber) return buffer->array(); } -Array *AESEncrypt(Array * ivBytes, AESKey * key, Array * data) { +Array *AESEncrypt(Array *ivBytes, AESKey *key, Array *data) { return NULL; } -Array *AESDecrypt(Array * ivBytes, AESKey * key, Array * data) { +Array *AESDecrypt(Array *ivBytes, AESKey *key, Array *data) { return NULL; } @@ -397,7 +397,7 @@ Array *CloudComm::processSlots(int fd) { return slots; } -Array *CloudComm::sendLocalData(Array *sendData, int64_t localSequenceNumber, IoTString * host, int port) { +Array *CloudComm::sendLocalData(Array *sendData, int64_t localSequenceNumber, IoTString *host, int port) { if (salt == NULL) return NULL; try {