Fixed identity print statement in examples/client-server

This commit is contained in:
Joseph Henry
2017-11-13 15:26:17 -08:00
parent 05ac5ad5ca
commit 0cb162672e
2 changed files with 7 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <string> #include <string>
#include <inttypes.h>
#if defined(__linux__) || defined(__APPLE__) #if defined(__linux__) || defined(__APPLE__)
#include <netinet/in.h> #include <netinet/in.h>
@@ -43,10 +44,11 @@ int main(int argc, char **argv)
// --- BEGIN // --- BEGIN
DEBUG_TEST("Waiting for libzt to come online...\n"); DEBUG_TEST("Waiting for libzt to come online...\n");
uint64_t nwid = strtoll(nwidstr.c_str(),NULL,16); uint64_t nwid = strtoull(nwidstr.c_str(),NULL,16);
printf("nwid=%llx\n", nwid);
zts_startjoin(path.c_str(), nwid); zts_startjoin(path.c_str(), nwid);
uint64_t nodeId = zts_get_node_id(); uint64_t nodeId = zts_get_node_id();
DEBUG_TEST("I am %x", nodeId); DEBUG_TEST("I am %llx", nodeId);
sleep(2); sleep(2);
// socket() // socket()

View File

@@ -40,10 +40,11 @@ int main(int argc, char **argv)
DEBUG_TEST("Waiting for libzt to come online...\n"); DEBUG_TEST("Waiting for libzt to come online...\n");
uint64_t nwid = strtoll(nwidstr.c_str(),NULL,16); uint64_t nwid = strtoull(nwidstr.c_str(),NULL,16);
printf("nwid=%llx\n", nwid);
zts_startjoin(path.c_str(), nwid); zts_startjoin(path.c_str(), nwid);
uint64_t nodeId = zts_get_node_id(); uint64_t nodeId = zts_get_node_id();
DEBUG_TEST("I am %x", nodeId); DEBUG_TEST("I am %llx", nodeId);
sleep(2); sleep(2);
// socket() // socket()