Imported Upstream version 2.7.4

This commit is contained in:
Laurent Bigonville 2016-07-18 02:11:41 +02:00
parent fd413a3168
commit c9cb2187ee
290 changed files with 7473 additions and 2607 deletions

View file

@ -255,6 +255,7 @@ LD = @LD@
LDFLAGS = @LDFLAGS@
LIBAVAHI_CFLAGS = @LIBAVAHI_CFLAGS@
LIBAVAHI_LIBS = @LIBAVAHI_LIBS@
LIBDIR = @LIBDIR@
LIBGD_CFLAGS = @LIBGD_CFLAGS@
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
LIBIPMI_CFLAGS = @LIBIPMI_CFLAGS@

View file

@ -156,9 +156,10 @@ static void get_type(nut_ctype_t *client, const char *upsname, const char *var)
return;
}
/* hmm... */
/* Any variable that is not string | range | enum is just a simple
* numeric value */
sendback(client, "TYPE %s %s UNKNOWN\n", upsname, var);
sendback(client, "TYPE %s %s NUMBER\n", upsname, var);
}
static void get_var_server(nut_ctype_t *client, const char *upsname, const char *var)

View file

@ -334,7 +334,7 @@ int sendback(nut_ctype_t *client, const char *fmt, ...)
res = write(client->sock_fd, ans, len);
}
upsdebugx(2, "write: [destfd=%d] [len=%d] [%s]", client->sock_fd, len, rtrim(ans, '\n'));
upsdebugx(2, "write: [destfd=%d] [len=%d] [%s]", client->sock_fd, len, str_rtrim(ans, '\n'));
if (len != res) {
upslog_with_errno(LOG_NOTICE, "write() failed for %s", client->addr);