salt(NULL),
table(NULL),
listeningPort(-1),
- localServerThread(NULL),
doEnd(false),
timer(TimingSingleton_getInstance()),
getslot(new Array<char>("getslot", 7)),
salt(NULL),
table(_table),
listeningPort(_listeningPort),
- localServerThread(NULL),
doEnd(false),
timer(TimingSingleton_getInstance()) {
if (listeningPort > 0) {
}
response[offset] = 0;
int ver1 = 0, ver2 = 0, respcode = 0;
- sscanf(response, "HTTP-%d.%d %d", &ver1, &ver2, &respcode);
+ sscanf(response, "HTTP/%d.%d %d", &ver1, &ver2, &respcode);
+ printf("Response code %d\n", respcode);
return respcode;
}
void CloudComm::closeCloud() {
doEnd = true;
- if (localServerThread != NULL) {
+ if (listeningPort > 0) {
if (pthread_join(localServerThread, NULL) != 0)
throw new Error("Local Server thread join issue...");
}