summaryrefslogtreecommitdiffstats
path: root/customdhcpcd/src/logwriter.c
diff options
context:
space:
mode:
authorNiklas2011-10-27 19:58:45 +0200
committerNiklas2011-10-27 19:58:45 +0200
commita418d8ca1e04fc4f216aa74e7827f755b02e0874 (patch)
tree8ba2a70eb79e3e99029e06a0324ece0531eb60c1 /customdhcpcd/src/logwriter.c
parentthe log message has now a newline (diff)
downloadfbgui-a418d8ca1e04fc4f216aa74e7827f755b02e0874.tar.gz
fbgui-a418d8ca1e04fc4f216aa74e7827f755b02e0874.tar.xz
fbgui-a418d8ca1e04fc4f216aa74e7827f755b02e0874.zip
disabled right click context menu, changed dialog button size (see css), changed customdhcp logger. it now sends all log messages through the socket
Diffstat (limited to 'customdhcpcd/src/logwriter.c')
-rw-r--r--customdhcpcd/src/logwriter.c26
1 files changed, 8 insertions, 18 deletions
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)*/