diff --git a/api.h b/api.h index 41bd0ad6..8bbffb19 100644 --- a/api.h +++ b/api.h @@ -24,7 +24,7 @@ void getClientNames(int *sock); // FTL methods void getMemoryUsage(int *sock); -void getClientID(int *sock, char type); +void getClientID(int *sock); void getVersion(int *sock, char type); void getDBstats(int *sock, char type); void getUnknownQueries(int *sock); diff --git a/api_stats.c b/api_stats.c index 1397cfbf..334798b1 100644 --- a/api_stats.c +++ b/api_stats.c @@ -892,10 +892,12 @@ void getForwardDestinationsOverTime(int *sock) logg("Sent overTime forwarded data to client, ID: %i", *sock); } -void getClientID(int *sock, char type) +void getClientID(int *sock) { - - ssend(*sock,"%i\n", *sock); + if(istelnet[*sock]) + ssend(*sock,"%i\n", *sock); + else + pack_int32(*sock, *sock); if(debugclients) logg("Sent client ID to client, ID: %i", *sock); diff --git a/request.c b/request.c index 8adc649e..71df2e62 100644 --- a/request.c +++ b/request.c @@ -71,7 +71,7 @@ void process_request(char *client_message, int *sock, char type) else if(command(client_message, ">clientID")) { processed = true; - getClientID(sock, type); + getClientID(sock); } else if(command(client_message, ">ForwardedoverTime")) {