Add socket implementation to getClientID and use istelnet

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-01-07 22:23:01 -05:00
parent 7d0f680347
commit 08143393f0
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -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);
+5 -3
View File
@@ -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);
+1 -1
View File
@@ -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"))
{