diff options
Diffstat (limited to 'server/src/queryhandler.cc')
-rw-r--r-- | server/src/queryhandler.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/src/queryhandler.cc b/server/src/queryhandler.cc index b78f8c4..b9ff7a1 100644 --- a/server/src/queryhandler.cc +++ b/server/src/queryhandler.cc @@ -62,7 +62,7 @@ typedef struct { #define SIOCGIFCONF 0x8912 // get iface list -static in_addr_t getIP(char *interface) +static in_addr_t getIP(const char *interface) { in_addr_t ret = 0; int numreqs = 30, sd, n; @@ -112,7 +112,7 @@ static unsigned short getCounter() } static UID uid = {0,0,0,0}; -static std::string getUID(char *interface) +static std::string getUID(const char *interface) { if(!uid.ip) uid.ip = getIP(interface); @@ -188,7 +188,8 @@ std::string QueryHandler::exec() socket->write(buf, strlen(buf)); // Terminate - socket->write("\0", 1); + char term[] = "\0"; + socket->write(term, 1); // Wait for answer char abuf[64]; |