From a418d8ca1e04fc4f216aa74e7827f755b02e0874 Mon Sep 17 00:00:00 2001 From: Niklas Date: Thu, 27 Oct 2011 19:58:45 +0200 Subject: disabled right click context menu, changed dialog button size (see css), changed customdhcp logger. it now sends all log messages through the socket --- customdhcpcd/src/logwriter.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'customdhcpcd/src/logwriter.c') diff --git a/customdhcpcd/src/logwriter.c b/customdhcpcd/src/logwriter.c index e407bc2..67cf839 100644 --- a/customdhcpcd/src/logwriter.c +++ b/customdhcpcd/src/logwriter.c @@ -113,6 +113,8 @@ void sendToQt(log_msg * msg) { */ } + + void logToQt(int status, int substatus, const char * msg) { if (retval >= 0) { log_msg lm; @@ -124,6 +126,8 @@ void logToQt(int status, int substatus, const char * msg) { } } + + void logSendToQt(int type) { switch (type) { case DHCP_DISCOVER: @@ -155,24 +159,7 @@ void logSendToQt(int type) { } } -void logLoggerToQt(int level, const char *fmt, ...) { - // Format string into buffer - va_list argptr; - va_start (argptr, fmt); - int size = 255 + 2; - char *string = (char *) malloc (size); - int required = vsnprintf (string, size, fmt, argptr); - if (required >= size) - { - size = required + 2; - string = (char *) realloc (string, size); - vsnprintf (string, size, fmt, argptr); - } - va_end (argptr); - - strcat(string, "\n"); - logToQt(level, DHCPCD_LOG, string); -} + static void print_addresses (FILE *f, const struct address_head *addresses) { @@ -184,6 +171,9 @@ static void print_addresses (FILE *f, const struct address_head *addresses) fprintf (f, " "); } } + + + void logGatewayToFile(const interface_t *iface, const dhcp_t *dhcp) { /*void logGatewayToFile(const interface_t iface, const dhcp_t *dhcp, const options_t options)*/ -- cgit v1.2.3-55-g7522