Diffstat (limited to 'noncore/net/wellenreiter/daemon/source/daemon.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/daemon/source/daemon.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/daemon/source/daemon.cc b/noncore/net/wellenreiter/daemon/source/daemon.cc index 7972c0f..8724efa 100644 --- a/noncore/net/wellenreiter/daemon/source/daemon.cc +++ b/noncore/net/wellenreiter/daemon/source/daemon.cc @@ -48,35 +48,36 @@ int main(int argc, char **argv) if(FD_ISSET(sock, &rset)) { memset(buffer, 0, sizeof(buffer)); if(recvfrom(sock, buffer, sizeof(buffer)-1, 0, (struct sockaddr *)cliaddr, &len) < 0) { log_err("Cannot read from socket: %s", strerror(errno)); break; } log_info("Received command from '%s': %s", inet_ntoa(cliaddr->sin_addr), buffer); /* Pass string to analyze function */ commstring(buffer); } /* Will be replaced with sniffer ... later */ if(FD_ISSET(fileno(fp), &rset)) { memset(buffer, 0, sizeof(buffer)); if(fgets(buffer, sizeof(buffer) - 1, fp) == NULL) { log_err("Cannot read from stdin: %s", strerror(errno)); break; } + log_info("Sending command to '%s': %s", GUIADDR, buffer); /* Send string to GUI */ sendgui("%d: %s", 1234, buffer); } } close(sock); return 0; } |