Imported Upstream version 2.6.4

This commit is contained in:
Arnaud Quette 2012-06-01 15:55:19 +02:00
parent fad6ced6f6
commit fefe62b2bd
257 changed files with 6020 additions and 1394 deletions

View file

@ -694,7 +694,7 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2)
snprintfcat(buf, sizeof(buf), " \"%s\"",
pconf_encode(arg2, enc, sizeof(enc)));
snprintfcat(buf, sizeof(buf), "\n");
snprintfcat(enc, sizeof(enc), "%s\n", buf);
/* see if the parent needs to be started (and maybe start it) */
@ -715,10 +715,10 @@ static void sendcmd(const char *cmd, const char *arg1, const char *arg2)
/* we're connected now */
ret = write(pipefd, buf, strlen(buf));
ret = write(pipefd, enc, strlen(enc));
/* if we can't send the whole thing, loop back and try again */
if ((ret < 1) || (ret != (int) strlen(buf))) {
if ((ret < 1) || (ret != (int) strlen(enc))) {
upslogx(LOG_ERR, "write failed, trying again");
close(pipefd);
continue;