mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed problem with invalid RFC2822 date in email header for different locale
SVN revision: 1144
This commit is contained in:
parent
b200ee5b92
commit
bb747e27cb
13
src/elogd.c
13
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.520 2004/12/17 21:32:50 midas
|
||||||
|
Fixed problem with invalid RFC2822 date in email header for different locale
|
||||||
|
|
||||||
Revision 1.519 2004/12/13 20:53:12 midas
|
Revision 1.519 2004/12/13 20:53:12 midas
|
||||||
Fixed problem with conditional attributes and edit
|
Fixed problem with conditional attributes and edit
|
||||||
|
|
||||||
@ -1055,6 +1058,7 @@ int set_attributes(LOGBOOK * lbs, char attributes[][NAME_LENGTH], int n);
|
|||||||
void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *info);
|
void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n, char *info);
|
||||||
int change_config_line(LOGBOOK * lbs, char *option, char *old_value, char *new_value);
|
int change_config_line(LOGBOOK * lbs, char *option, char *old_value, char *new_value);
|
||||||
int read_password(char *pwd, int size);
|
int read_password(char *pwd, int size);
|
||||||
|
int getcfg(char *group, char *param, char *value, int vsize);
|
||||||
|
|
||||||
/*---- Funcions from the MIDAS library -----------------------------*/
|
/*---- Funcions from the MIDAS library -----------------------------*/
|
||||||
|
|
||||||
@ -2269,6 +2273,9 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to,
|
|||||||
efputs(str);
|
efputs(str);
|
||||||
write_logfile(lbs, str);
|
write_logfile(lbs, str);
|
||||||
|
|
||||||
|
/* switch locale temporarily back to english to comply with RFC2822 date format */
|
||||||
|
setlocale(LC_ALL, "english");
|
||||||
|
|
||||||
time(&now);
|
time(&now);
|
||||||
ts = localtime(&now);
|
ts = localtime(&now);
|
||||||
strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S", ts);
|
strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S", ts);
|
||||||
@ -2286,6 +2293,10 @@ INT sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to,
|
|||||||
efputs(str);
|
efputs(str);
|
||||||
write_logfile(lbs, str);
|
write_logfile(lbs, str);
|
||||||
|
|
||||||
|
getcfg("global", "Language", str, sizeof(str));
|
||||||
|
if (str[0])
|
||||||
|
setlocale(LC_ALL, str);
|
||||||
|
|
||||||
if (n_att > 0) {
|
if (n_att > 0) {
|
||||||
snprintf(str, strsize - 1, "MIME-Version: 1.0\r\n");
|
snprintf(str, strsize - 1, "MIME-Version: 1.0\r\n");
|
||||||
send(s, str, strlen(str), 0);
|
send(s, str, strlen(str), 0);
|
||||||
@ -19333,7 +19344,7 @@ void interprete(char *lbook, char *path)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strieq(command, "GetPwdFile")) {
|
if (strieq(command, loc("GetPwdFile"))) {
|
||||||
getcfg(lbs->name, "Password file", str, sizeof(str));
|
getcfg(lbs->name, "Password file", str, sizeof(str));
|
||||||
|
|
||||||
if (str[0] == DIR_SEPARATOR || str[1] == ':')
|
if (str[0] == DIR_SEPARATOR || str[1] == ':')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user