From: Timo Sirainen Date: Fri, 21 Mar 2003 06:47:05 +0000 (+0200) Subject: Call the hostpid_init() always at startup. Easier than doing it all around. X-Git-Tag: 1.1.alpha1~4793 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=915670e66a43b4396cc8fc9b3f586015a443bf4e;p=thirdparty%2Fdovecot%2Fcore.git Call the hostpid_init() always at startup. Easier than doing it all around. --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-index-util.c b/src/lib-index/mail-index-util.c index 81c308215e..e5a38b92c0 100644 --- a/src/lib-index/mail-index-util.c +++ b/src/lib-index/mail-index-util.c @@ -93,8 +93,6 @@ int mail_index_create_temp_file(struct mail_index *index, const char **path) { int fd; - hostpid_init(); - /* use ".temp.host.pid" as temporary file name. unlink() it first, just to be sure it's not symlinked somewhere for some reason.. FIXME: this function should rather be removed entirely. With diff --git a/src/lib-storage/index/mbox/mbox-save.c b/src/lib-storage/index/mbox/mbox-save.c index a8f17b06c7..46460ca8c6 100644 --- a/src/lib-storage/index/mbox/mbox-save.c +++ b/src/lib-storage/index/mbox/mbox-save.c @@ -93,7 +93,6 @@ static int write_from_line(struct mail_save_context *ctx, time_t received_date) if (*my_hostdomain == '\0') { struct hostent *hent; - hostpid_init(); hent = gethostbyname(my_hostname); name = hent != NULL ? hent->h_name : NULL; diff --git a/src/lib/file-dotlock.c b/src/lib/file-dotlock.c index 50370af746..4f57ba0a3c 100644 --- a/src/lib/file-dotlock.c +++ b/src/lib/file-dotlock.c @@ -189,8 +189,6 @@ int file_lock_dotlock(const char *path, int checkonly, unsigned int stale_notify_threshold; time_t now, max_wait_time, last_notify; - hostpid_init(); - now = time(NULL); lock_path = t_strconcat(path, ".lock", NULL); diff --git a/src/lib/lib.c b/src/lib/lib.c index 0e6cc6bd76..11668c96b7 100644 --- a/src/lib/lib.c +++ b/src/lib/lib.c @@ -46,6 +46,7 @@ void lib_init(void) data_stack_init(); imem_init(); + hostpid_init(); } void lib_deinit(void)