summaryrefslogtreecommitdiffstats
path: root/customdhcpcd/src/logwriter.c
diff options
context:
space:
mode:
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)*/