summaryrefslogtreecommitdiffstats
path: root/customdhcpcd
diff options
context:
space:
mode:
authorNiklas2011-09-02 12:19:54 +0200
committerNiklas2011-09-02 12:19:54 +0200
commitb7614e568bba20eeaa82b186ac497ac63b197638 (patch)
tree3b64ce21197b849797f71551135818194419b039 /customdhcpcd
parentfix message loss (diff)
downloadfbgui-b7614e568bba20eeaa82b186ac497ac63b197638.tar.gz
fbgui-b7614e568bba20eeaa82b186ac497ac63b197638.tar.xz
fbgui-b7614e568bba20eeaa82b186ac497ac63b197638.zip
just minor changes. deltions of unuseful comments
Diffstat (limited to 'customdhcpcd')
-rwxr-xr-xcustomdhcpcd/src/customdhcpcdbin195074 -> 175308 bytes
-rw-r--r--customdhcpcd/src/logwriter.c22
-rw-r--r--customdhcpcd/src/logwriter.h2
3 files changed, 2 insertions, 22 deletions
diff --git a/customdhcpcd/src/customdhcpcd b/customdhcpcd/src/customdhcpcd
index 80fec08..3676699 100755
--- a/customdhcpcd/src/customdhcpcd
+++ b/customdhcpcd/src/customdhcpcd
Binary files differ
diff --git a/customdhcpcd/src/logwriter.c b/customdhcpcd/src/logwriter.c
index 6a04821..a96bbda 100644
--- a/customdhcpcd/src/logwriter.c
+++ b/customdhcpcd/src/logwriter.c
@@ -62,23 +62,6 @@ void closeQtLoggerSocket (){
close(sockfd);
}
-/*
-void logToQt(char * status, char * substatus, char * msg) {
- char * m = malloc(strlen(interfaceName) + strlen(status) + strlen(substatus) + strlen(msg) +4 );
- strcpy(m,interfaceName);
- strcat(m,";");
- strcat(m,status);
- strcat(m,";");
- strcat(m,substatus);
- strcat(m,";");
- strcat(m,msg);
- sendToQt(m);
-
- free(m);
-}
-*/
-
-
void sendToQt(log_msg * msg) {
int n = -1;
int t;
@@ -107,14 +90,12 @@ void sendToQt(log_msg * msg) {
if (outbuf != NULL) {
n = send(sockfd, outbuf, DHCP_MESSAGE_SIZE, 0);
}
- //free(outbuf);
syslog(LOG_INFO, "[fbgui] INFO writing to socket: [%d:%d] %s (%s)",
msg->status, msg->substatus, msg->msg, msg->device);
- // fflush(sockfd);
+
if (n <= 0) {
syslog(LOG_ERR, "[fbgui] ERROR writing to socket: [%d:%d] %s (%s)",
msg->status, msg->substatus, msg->msg, msg->device);
- // fprintf(stdout, "ERROR writing to socket: %s", msg);
}
memset(ack,0,ACK_SIZE);
if ((t = recv(sockfd, ack, ACK_SIZE, 0)) > 0) {
@@ -126,7 +107,6 @@ void sendToQt(log_msg * msg) {
else
syslog(LOG_ERR, "[fbgui] ERROR Server closed");
}
- //usleep(500);
}
void logToQt(int status, int substatus, const char * msg) {
diff --git a/customdhcpcd/src/logwriter.h b/customdhcpcd/src/logwriter.h
index 1e4184d..bb834cb 100644
--- a/customdhcpcd/src/logwriter.h
+++ b/customdhcpcd/src/logwriter.h
@@ -32,6 +32,6 @@ void logToQt(int status, int substatus, const char * msg);
void logSendToQt(int type);
void logLoggerToQt(int level, const char *fmt, va_list args);
//void logToQt(char * status, char * substatus, char * msg);
-//void logGatewayToFile(const interface_t iface, const dhcp_t dhcp);
+void logGatewayToFile(const interface_t iface, const dhcp_t dhcp);
#endif /* LOGWRITER_H_ */