WCC->Policy[which].expire_value = StrBufExtractNext_long(Buf, &Pos, '|');
}
else if (State == 550)
- StrBufAppendBufPlain(WCC->ImportantMsg,
- _("Higher access is required to access this function."), -1, 0);
+ AppendImportantMessage(_("Higher access is required to access this function."), -1);
FreeStrBuf(&Buf);
}
StrBuf_ServGetln(Buf);
GetServerStatus(Buf, &State);
if (State == 550)
- StrBufAppendBufPlain(WC->ImportantMsg,
- _("Higher access is required to access this function."), -1, 0);
+ AppendImportantMessage(_("Higher access is required to access this function."), -1);
FreeStrBuf(&Buf);
}
if (GetServerStatus(Buf, NULL) != 1) {
StrBufCutLeft(Buf, 4);
AppendImportantMessage(SKEY(Buf));
+ FreeStrBuf(&Buf);
return;
}
while ((len = StrBuf_ServGetln(Buf),
strcmp(ChrPtr(Buf), "000"))) {}
AppendImportantMessage(_("WARNING: Failed to parse Server Config; do you run a to new citserver?"), -1);
+ FreeStrBuf(&Buf);
return;
}
FreeStrBuf(&Buf);
{
wcsession *WCC = WC;
int i;
- char buf[256];
+ StrBuf *Line;
if (strlen(bstr("ok_button")) == 0) {
display_aide_menu();
return;
}
+ Line = NewStrBuf();
serv_printf("CONF set");
- serv_getln(buf, sizeof buf);
- if (buf[0] != '4') {
- safestrncpy(WCC->ImportantMessage, &buf[4], sizeof WCC->ImportantMessage);
+ StrBuf_ServGetln(Line);
+ if (GetServerStatusMsg(Line, NULL, 1, 4) != 4) {
display_aide_menu();
+ FreeStrBuf(&Line);
return;
}
+ FreeStrBuf(&Line);
+
for (i=0; i < (sizeof(ServerConfig) / sizeof(CfgMapping)); i ++)
{
switch (ServerConfig[i].type) {
FreeStrBuf(&WCC->serv_info->serv_default_cal_zone);
WCC->serv_info->serv_default_cal_zone = NewStrBufDup(sbstr("c_default_cal_zone"));
- safestrncpy(WCC->ImportantMessage, _("Your system configuration has been updated."),
- sizeof WCC->ImportantMessage);
+ AppendImportantMessage(_("Your system configuration has been updated."), -1);
DeleteHash(&WCC->ServCfg);
display_aide_menu();
}