diff --git a/conman.c b/conman.c index 5b379708..0886327b 100644 --- a/conman.c +++ b/conman.c @@ -606,7 +606,11 @@ static int doSockWrite(SConnection *self, char *buffer) } else { - puts(buffer); + if (HasNL(buffer)) { + fputs(buffer, stdout); + } else { + puts(buffer); + } } return iRet; } @@ -1950,8 +1954,18 @@ SConnection *SCLoad(SCStore *con) { pCon = con->pCon; if (pCon) { if (con->ident != pCon->ident) { - con->pCon == NULL; /* connection has died */ + con->pCon = NULL; /* connection is dead */ + pCon = NULL; } } return pCon; } +/*--------------------------------------------------------------------------*/ +void KillFreeConnections(void) { + SConnection *next; + while (freeConnections) { + next = freeConnections->next; + free(freeConnections); + freeConnections = next; + } +}