Mercurial > noffle
diff src/database.c @ 244:4e69e9b722ae noffle
[svn] * src/database.c,src/protocol.c,src/util.c,src/util.h: The latest IETF
article format draft draft-ietf-usefor-article-06.txt recommends that
Xref: references contain the FQDN of the server. We were using the
host name without the domain. So split the routine used for obtaining
the FQDN from protocol.c into util.c, and use it when adding Xrefs.
author | bears |
---|---|
date | Fri, 15 Mar 2002 10:50:33 +0000 |
parents | fbff73fe5b40 |
children | 7a830ce3211e |
line wrap: on
line diff
--- a/src/database.c Fri Mar 15 10:49:56 2002 +0000 +++ b/src/database.c Fri Mar 15 10:50:33 2002 +0000 @@ -1,7 +1,7 @@ /* database.c - $Id: database.c 371 2002-02-26 17:13:31Z bears $ + $Id: database.c 375 2002-03-15 10:50:33Z bears $ Uses GNU gdbm library. Using Berkeley db (included in libc6) was cumbersome. It is based on Berkeley db 1.85, which has severe bugs @@ -85,7 +85,8 @@ if ( db.txt == NULL ) db.txt = new_DynStr( 5000 ); - gethostname( host, MAXCHAR ); + if ( ! Utl_getFQDN( host ) ) + Utl_cpyStr( host, "localhost.localdomain" ); snprintf( db.xrefHost, MAXCHAR, "Xref: %s", host ); return TRUE;