/*
* Functions that handle communication with a Citadel Server
*
- * Copyright (c) 1987-2016 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
int len = 0;
int c = 0;
- if (buf == NULL) return;
+ if (buf == NULL) return(-1);
while (len < maxbytes) {
c = read(ctdl->sock, &buf[len], 1);
--len;
}
buf[len] = 0;
- // syslog(LOG_DEBUG, "[ %s", buf);
+ // syslog(LOG_DEBUG, "\033[33m[ %s\033[0m", buf);
return(len);
}
++len;
}
- // syslog(LOG_DEBUG, "[ %s", buf);
+ // syslog(LOG_DEBUG, "\033[33m[ %s\033[0m", buf);
return(len);
}
StrBufVAppendPrintf(Buf, format, arg_ptr);
va_end(arg_ptr);
- // syslog(LOG_DEBUG, "] %s", ChrPtr(Buf));
+ syslog(LOG_DEBUG, "\033[32m] %s\033[0m", ChrPtr(Buf));
ctdl_write(ctdl, (char *)ChrPtr(Buf), StrLength(Buf));
ctdl_write(ctdl, "\n", 1);
FreeStrBuf(&Buf);