Added some forgotten client encoding

This commit is contained in:
Michiel Broek 2005-10-25 18:54:22 +00:00
parent 3f4c2aa548
commit 26dbee01a5
3 changed files with 59 additions and 50 deletions

View File

@ -3,6 +3,9 @@ $Id$
v0.81.4 23-Oct-2005 v0.81.4 23-Oct-2005
libmbse.a:
Added some forgotten client/server encoding.
v0.81.3 17-Oct-2005 - 23-Oct-2005 v0.81.3 17-Oct-2005 - 23-Oct-2005

View File

@ -197,7 +197,7 @@ char *SockR(const char *format, ...)
void WriteError(const char *format, ...) void WriteError(const char *format, ...)
{ {
char *outputstr; char *outputstr, *temp;
va_list va_ptr; va_list va_ptr;
int i; int i;
@ -235,9 +235,15 @@ void WriteError(const char *format, ...)
lcnt = 0; lcnt = 0;
} }
SockS("ALOG:5,%s,%s,%d,?,%s;", logdebug, progname, mypid, *outputstr == '$' ? outputstr+1 : outputstr); if (*outputstr == '$') {
SockS("ALOG:5,%s,%s,%d,?,%s;", logfile, progname, mypid, *outputstr == '$' ? outputstr+1 : outputstr); temp = xstrcpy(clencode(outputstr+1));
SockS("ALOG:5,%s,%s,%d,?,%s;", errfile, progname, mypid, *outputstr == '$' ? outputstr+1 : outputstr); } else {
temp = xstrcpy(clencode(outputstr));
}
SockS("ALOG:5,%s,%s,%d,?,%s;", logdebug, progname, mypid, temp);
SockS("ALOG:5,%s,%s,%d,?,%s;", logfile, progname, mypid, temp);
SockS("ALOG:5,%s,%s,%d,?,%s;", errfile, progname, mypid, temp);
free(temp);
free(outputstr); free(outputstr);
} }
@ -333,13 +339,13 @@ void Syslogp(int level, char *outstr)
printf("%c %s\n", level, outstr); printf("%c %s\n", level, outstr);
if (*outstr == '$') { if (*outstr == '$') {
SockS("ALOG:5,%s,%s,%d,%c,%s: %s;", logdebug, progname, mypid, level, outstr+1, strerror(errno)); SockS("ALOG:5,%s,%s,%d,%c,%s: %s;", logdebug, progname, mypid, level, clencode(outstr+1), strerror(errno));
if (!debug) if (!debug)
SockS("ALOG:5,%s,%s,%d,%c,%s: %s;", logfile, progname, mypid, level, outstr+1, strerror(errno)); SockS("ALOG:5,%s,%s,%d,%c,%s: %s;", logfile, progname, mypid, level, clencode(outstr+1), strerror(errno));
} else { } else {
SockS("ALOG:5,%s,%s,%d,%c,%s;", logdebug, progname, mypid, level, outstr); SockS("ALOG:5,%s,%s,%d,%c,%s;", logdebug, progname, mypid, level, clencode(outstr));
if (!debug) if (!debug)
SockS("ALOG:5,%s,%s,%d,%c,%s;", logfile, progname, mypid, level, outstr); SockS("ALOG:5,%s,%s,%d,%c,%s;", logfile, progname, mypid, level, clencode(outstr));
} }
} }
@ -363,7 +369,7 @@ void Mgrlog(const char *format, ...)
if (strlen(outstr) > (SS_BUFSIZE - 64)) if (strlen(outstr) > (SS_BUFSIZE - 64))
outstr[SS_BUFSIZE - 64] = '\0'; outstr[SS_BUFSIZE - 64] = '\0';
SockS("ALOG:5,%s,%s,%d,+,%s;", mgrfile, progname, mypid, outstr); SockS("ALOG:5,%s,%s,%d,+,%s;", mgrfile, progname, mypid, clencode(outstr));
Syslogp('+', outstr); Syslogp('+', outstr);
free(outstr); free(outstr);
} }
@ -381,7 +387,7 @@ void IsDoing(const char *format, ...)
vsnprintf(outputstr, SS_BUFSIZE, format, va_ptr); vsnprintf(outputstr, SS_BUFSIZE, format, va_ptr);
va_end(va_ptr); va_end(va_ptr);
SockS("ADOI:2,%d,%s;", mypid, outputstr); SockS("ADOI:2,%d,%s;", mypid, clencode(outputstr));
free(outputstr); free(outputstr);
} }

View File

@ -1124,7 +1124,7 @@ void ExportEmail(unsigned int MsgNum)
if (Msg_Read(MsgNum, 79)) { if (Msg_Read(MsgNum, 79)) {
if ((p = (char *)MsgText_First()) != NULL) { if ((p = (char *)MsgText_First()) != NULL) {
do { do {
Syslog('m', "%s", printable(p, 0)); Syslogp('m', printable(p, 0));
/* /*
* GoldED places ^A characters in front of the RFC headers, * GoldED places ^A characters in front of the RFC headers,
* so does mbsebbs as well. * so does mbsebbs as well.