Code cleanup

Sun, 25 May 2014 22:37:23 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 25 May 2014 22:37:23 +0200
changeset 52
4387a6b11eb3
parent 51
a03b6dac5398
child 53
37623517e0ef

Code cleanup

thermferm/server.c file | annotate | diff | comparison | revisions
--- a/thermferm/server.c	Sun May 25 22:06:56 2014 +0200
+++ b/thermferm/server.c	Sun May 25 22:37:23 2014 +0200
@@ -123,19 +123,13 @@
 
 void cmd_server(void)
 {
-    char                *inp, *hostname, buf[SS_BUFSIZE], obuf[SS_BUFSIZE];
+    char                *inp, buf[SS_BUFSIZE], obuf[SS_BUFSIZE];
     int                 i, rc, rlen;
     socklen_t           fromlen;
     float		newtemp;
 
-    hp = gethostbyaddr ((char *) &peeraddr_in.sin_addr, sizeof(struct in_addr), peeraddr_in.sin_family);
-    if (hp == NULL) {
-	hostname = inet_ntoa(peeraddr_in.sin_addr);
-    } else {
-	hostname = hp->h_name;
-    }
-
 //    if (debug) {
+//	char *hostname = inet_ntoa(peeraddr_in.sin_addr);
 //    	syslog(LOG_NOTICE, "Start new client connection from %s port %u", hostname, ntohs(peeraddr_in.sin_port));
 //	fprintf(stdout, "Start new client connection from %s port %u\n", hostname, ntohs(peeraddr_in.sin_port));
 //    }

mercurial