X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fscript.c;h=b94b25e9803acf8c0ce2cbc832a7d138c3ed661e;hp=f62ea5ef319fe965f489fd4456e77547ada56626;hb=a300c7335c5ad78fb053e7c73b45e95e1f3c2ad1;hpb=285abfbe5dbad63c499252df829332b969d4b746 diff --git a/src/script.c b/src/script.c index f62ea5e..b94b25e 100644 --- a/src/script.c +++ b/src/script.c @@ -1,5 +1,5 @@ /** - * Copyright (C) 2012 Steven Barth + * Copyright (C) 2012-2013 Steven Barth * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License v2 as published by @@ -149,11 +149,10 @@ static void entry_to_env(const char *name, const void *data, size_t len, bool ho buf_len += strlen(&buf[buf_len]); } buf_len += snprintf(&buf[buf_len], 24, ",%u", e[i].valid); + buf_len += snprintf(&buf[buf_len], 12, ",%u", e[i].priority); } else { buf_len += snprintf(&buf[buf_len], 24, ",%u,%u", e[i].preferred, e[i].valid); } - if (e[i].priority) - buf_len += snprintf(&buf[buf_len], 12, ",%u", e[i].priority); } buf[buf_len++] = ' '; } @@ -165,7 +164,6 @@ static void entry_to_env(const char *name, const void *data, size_t len, bool ho void script_call(const char *status) { - syslog(LOG_WARNING, "State for %s changed to %s", argv[1], status); size_t dns_len, search_len, custom_len, sntp_ip_len, sntp_dns_len; size_t sip_ip_len, sip_fqdn_len;