diff --git a/ChangeLog b/ChangeLog index de650a11..02dcabf1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ ebus Daemon (ebusd) - ChangeLog =============================== +2014-02-21: +* fix crash: Create a local copy of the string. (thx Hannes Gredler) +* Some cosmetic changes. + 2014-02-20: * Missing void declarations in various function parameter added. * New branch "socket" created. diff --git a/NEWS b/NEWS index 34dcfbf1..ce932431 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ ebus Daemon (ebusd) - NEWS ========================== +2014-02-21: +* Improved ebus device handling to use tcp based device too. + 2013-11-19: * Data type of struct commands.s_type changed from integer to char[2]. diff --git a/contrib/etc/ebusd/ebusd.conf b/contrib/etc/ebusd/ebusd.conf index 59b12c17..af67168e 100644 --- a/contrib/etc/ebusd/ebusd.conf +++ b/contrib/etc/ebusd/ebusd.conf @@ -6,7 +6,7 @@ # configuration directory of command files (/etc/ebusd) #cfgdir=/etc/ebusd -# serial device (/dev/ttyUSB0) +# bus device (/dev/ttyUSB0 or host:port) #device=/dev/ttyUSB0 # extension of command files (csv) @@ -21,7 +21,7 @@ # log file (/var/log/ebusd.log) #logfile=/var/log/ebusd.log -# don't check serial device (NO | YES/NO) +# don't check bus device (NO | YES/NO) #nodevicecheck=YES # pid file (/var/run/ebusd.pid) diff --git a/src/ebusd.c b/src/ebusd.c index 29ce2a5f..1441fe48 100644 --- a/src/ebusd.c +++ b/src/ebusd.c @@ -105,7 +105,7 @@ static struct config cfg[] = { {"address", STR, &address, "\tbus address (" NUMSTR(EBUS_QQ) ")"}, {"cfgdir", STR, &cfgdir, "\tconfiguration directory of command files (" DAEMON_CFGDIR ")"}, {"cfgfile", STR, &cfgfile, "\tdaemon configuration file (" DAEMON_CFGFILE ")"}, -{"device", STR, &device, "\tbus device (" SERIAL_DEVICE ")"}, +{"device", STR, &device, "\tbus device (" SERIAL_DEVICE " or host:port)"}, {"extension", STR, &extension, "extension of command files (" DAEMON_EXTENSION ")"}, {"foreground", BOL, &foreground, "run in foreground"}, {"loglevel", STR, &loglevel, "\tlog level (INF | " LOGTXT ")"}, @@ -413,7 +413,7 @@ cleanup(int state) if (eb_bus_close() == -1) log_print(L_ERR, "can't close device: %s", device); else - log_print(L_INF, "%s closed", device); + log_print(L_INF, "device %s closed", device); } /* close rawfile */ @@ -510,7 +510,7 @@ main_loop(void) if (eb_bus_close() == -1) log_print(L_ERR, "can't close device: %s", device); else - log_print(L_INF, "%s closed", device); + log_print(L_INF, "device %s closed", device); } @@ -519,7 +519,7 @@ main_loop(void) /* open bus device */ if (eb_bus_open(device, &busfd) == 0) { - log_print(L_INF, "%s opened", device); + log_print(L_INF, "device %s opened", device); sfd_closed = NO; } @@ -722,7 +722,7 @@ main(int argc, char *argv[]) log_print(L_ALL, "can't open device: %s", device); cleanup(EXIT_FAILURE); } else { - log_print(L_INF, "%s opened", device); + log_print(L_INF, "device %s opened", device); }