Pref->Type = PrefType;
Pref->eFlatPrefType = Pref->Type->eType;
- lprintf(1, "Loading [%s]with type [%ld] [\"%s\"]\n",
+ syslog(1, "Loading [%s]with type [%ld] [\"%s\"]\n",
ChrPtr(Pref->Key),
Pref->Type->eType,
ChrPtr(Pref->Val));
if (PrefType->OnLoad != NULL){
- lprintf(1, "Loading with: -> %s(\"%s\", %ld)\n",
+ syslog(1, "Loading with: -> %s(\"%s\", %ld)\n",
ChrPtr(PrefType->OnLoadName),
ChrPtr(Pref->Val),
Pref->lval);
Preference *LastData = NULL;
while (!Done) {
- StrBuf_ServGetln(ReadBuf);
+ if (StrBuf_ServGetln(ReadBuf) < 0)
+ break;
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
else
{
StrBufTrim(ReadBuf);
- lprintf(1, "ignoring spurious preference line: [%s]\n",
+ syslog(1, "ignoring spurious preference line: [%s]\n",
ChrPtr(ReadBuf));
DestroyPreference(Data);
LastData = NULL;
serv_puts("000");
}
while (!Done &&
- StrBuf_ServGetln(ReadBuf)) {
+ (StrBuf_ServGetln(ReadBuf) >= 0)) {
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
serv_printf("MSG0 %ld", msgnum);
StrBuf_ServGetln(ReadBuf);
if (GetServerStatus(ReadBuf, NULL) == 1) {
- while (StrBuf_ServGetln(ReadBuf),
+ while ((StrBuf_ServGetln(ReadBuf) >= 0) &&
(strcmp(ChrPtr(ReadBuf), "text") &&
strcmp(ChrPtr(ReadBuf), "000"))) {
}
serv_puts("000");
}
while (!Done &&
- StrBuf_ServGetln(ReadBuf)) {
+ (StrBuf_ServGetln(ReadBuf) >= 0)) {
if ( (StrLength(ReadBuf)==3) &&
!strcmp(ChrPtr(ReadBuf), "000")) {
Done = 1;
Pref->Type = PrefType;
Pref->eFlatPrefType = PrefType->eType;
if (Pref->Type->eType != lPrefType)
- lprintf(1, "warning: saving preference with wrong type [%s] %ld != %ld \n",
+ syslog(1, "warning: saving preference with wrong type [%s] %ld != %ld \n",
key, Pref->Type->eType, lPrefType);
switch (Pref->Type->eType)
{