Preparation for C--, removed classes, namespaces, advanced build options are now controlled via include/libztDefs.h

This commit is contained in:
Joseph Henry
2017-11-06 13:50:20 -08:00
parent 920afa079e
commit e0d4b84dd4
65 changed files with 12208 additions and 2609 deletions

View File

@@ -20,7 +20,7 @@ int main(int argc, char **argv)
exit(0);
}
std::string path = argv[1];
std::string nwid = argv[2];
std::string nwidstr = argv[2];
std::string remote_addr = argv[3];
int remote_port = atoi(argv[4]);
int r=0, w=0, err=0, sockfd;
@@ -36,10 +36,10 @@ int main(int argc, char **argv)
// --- BEGIN
DEBUG_TEST("Waiting for libzt to come online...\n");
zts_startjoin(path.c_str(), nwid.c_str());
char device_id[11];
zts_get_id(device_id);
DEBUG_TEST("I am %s", device_id);
uint64_t nwid = strtoll(nwidstr.c_str(),NULL,16);
zts_startjoin(path.c_str(), nwid);
uint64_t nodeId = zts_get_node_id();
DEBUG_TEST("I am %x", nodeId);
sleep(2);
// socket()

View File

@@ -18,7 +18,7 @@ int main(int argc, char **argv)
exit(0);
}
std::string path = argv[1];
std::string nwid = argv[2];
std::string nwidstr = argv[2];
int bind_port = atoi(argv[3]);
int w=0, r=0, err=0, sockfd, accfd;
char rbuf[32];
@@ -33,10 +33,10 @@ int main(int argc, char **argv)
DEBUG_TEST("Waiting for libzt to come online...\n");
zts_startjoin(path.c_str(), nwid.c_str());
char device_id[11];
zts_get_id(device_id);
DEBUG_TEST("I am %s", device_id);
uint64_t nwid = strtoll(nwidstr.c_str(),NULL,16);
zts_startjoin(path.c_str(), nwid);
uint64_t nodeId = zts_get_node_id();
DEBUG_TEST("I am %x", nodeId);
sleep(2);
// socket()