Mercurial > noffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
243:6eb6c912a0e4 | 244:4e69e9b722ae |
---|---|
1 /* | 1 /* |
2 database.c | 2 database.c |
3 | 3 |
4 $Id: database.c 371 2002-02-26 17:13:31Z bears $ | 4 $Id: database.c 375 2002-03-15 10:50:33Z bears $ |
5 | 5 |
6 Uses GNU gdbm library. Using Berkeley db (included in libc6) was | 6 Uses GNU gdbm library. Using Berkeley db (included in libc6) was |
7 cumbersome. It is based on Berkeley db 1.85, which has severe bugs | 7 cumbersome. It is based on Berkeley db 1.85, which has severe bugs |
8 (e.g. it is not recommended to delete or overwrite entries with | 8 (e.g. it is not recommended to delete or overwrite entries with |
9 overflow pages). | 9 overflow pages). |
83 Log_dbg( LOG_DBG_NEWSBASE, "%s opened for r/w", name ); | 83 Log_dbg( LOG_DBG_NEWSBASE, "%s opened for r/w", name ); |
84 | 84 |
85 if ( db.txt == NULL ) | 85 if ( db.txt == NULL ) |
86 db.txt = new_DynStr( 5000 ); | 86 db.txt = new_DynStr( 5000 ); |
87 | 87 |
88 gethostname( host, MAXCHAR ); | 88 if ( ! Utl_getFQDN( host ) ) |
89 Utl_cpyStr( host, "localhost.localdomain" ); | |
89 snprintf( db.xrefHost, MAXCHAR, "Xref: %s", host ); | 90 snprintf( db.xrefHost, MAXCHAR, "Xref: %s", host ); |
90 | 91 |
91 return TRUE; | 92 return TRUE; |
92 } | 93 } |
93 | 94 |