Imported Upstream version 2.7.4
This commit is contained in:
parent
fd413a3168
commit
c9cb2187ee
290 changed files with 7473 additions and 2607 deletions
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
static int sockfd = -1, stale = 1, alarm_active = 0, ignorelb = 0;
|
||||
static char *sockfn = NULL;
|
||||
static char status_buf[ST_MAX_VALUE_LEN], alarm_buf[ST_MAX_VALUE_LEN];
|
||||
static char status_buf[ST_MAX_VALUE_LEN], alarm_buf[LARGEBUF];
|
||||
static st_tree_t *dtree_root = NULL;
|
||||
static conn_t *connhead = NULL;
|
||||
static cmdlist_t *cmdhead = NULL;
|
||||
|
|
@ -185,7 +185,7 @@ static void send_to_all(const char *fmt, ...)
|
|||
ret = write(conn->fd, buf, strlen(buf));
|
||||
|
||||
if (ret != (int)strlen(buf)) {
|
||||
upsdebugx(2, "write %d bytes to socket %d failed", (int)strlen(buf), conn->fd);
|
||||
upsdebugx(1, "write %d bytes to socket %d failed", (int)strlen(buf), conn->fd);
|
||||
sock_disconnect(conn);
|
||||
}
|
||||
}
|
||||
|
|
@ -211,7 +211,7 @@ static int send_to_one(conn_t *conn, const char *fmt, ...)
|
|||
ret = write(conn->fd, buf, strlen(buf));
|
||||
|
||||
if (ret != (int)strlen(buf)) {
|
||||
upsdebugx(2, "write %d bytes to socket %d failed", (int)strlen(buf), conn->fd);
|
||||
upsdebugx(1, "write %d bytes to socket %d failed", (int)strlen(buf), conn->fd);
|
||||
sock_disconnect(conn);
|
||||
return 0; /* failed */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue