mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-12 19:33:03 +00:00
Use hostname from -n parameter for redirection if given
SVN revision: 1146
This commit is contained in:
parent
aca5f84698
commit
d62814209f
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.522 2004/12/17 22:18:29 midas
|
||||||
|
Use hostname from -n parameter for redirection if given
|
||||||
|
|
||||||
Revision 1.521 2004/12/17 21:50:28 midas
|
Revision 1.521 2004/12/17 21:50:28 midas
|
||||||
Fixed attribute substitutions in 'use email from'
|
Fixed attribute substitutions in 'use email from'
|
||||||
|
|
||||||
@ -19936,7 +19939,11 @@ void server_loop(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* get host name for mail notification */
|
/* get host name for mail notification */
|
||||||
gethostname(host_name, sizeof(host_name));
|
if (tcp_hostname[0])
|
||||||
|
strlcpy(host_name, tcp_hostname, sizeof(host_name));
|
||||||
|
else
|
||||||
|
gethostname(host_name, sizeof(host_name));
|
||||||
|
|
||||||
phe = gethostbyname(host_name);
|
phe = gethostbyname(host_name);
|
||||||
if (phe != NULL)
|
if (phe != NULL)
|
||||||
phe = gethostbyaddr(phe->h_addr, sizeof(int), AF_INET);
|
phe = gethostbyaddr(phe->h_addr, sizeof(int), AF_INET);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user