]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Call the hostpid_init() always at startup. Easier than doing it all around.
authorTimo Sirainen <tss@iki.fi>
Fri, 21 Mar 2003 06:47:05 +0000 (08:47 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 21 Mar 2003 06:47:05 +0000 (08:47 +0200)
--HG--
branch : HEAD

src/lib-index/mail-index-util.c
src/lib-storage/index/mbox/mbox-save.c
src/lib/file-dotlock.c
src/lib/lib.c

index 81c308215ec5d7ee70bf4bfc563386908a8752fc..e5a38b92c0e917765d42889644ddba9ee79aa217 100644 (file)
@@ -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
index a8f17b06c735e8842c66e4af38a0e4906d119cc3..46460ca8c685ebd7f0b3345a63eeb39e72585d05 100644 (file)
@@ -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;
index 50370af74685fba1ddc2d9c1c14b18399d252c49..4f57ba0a3c07e9d27aae7097ba53abb7fc1302fa 100644 (file)
@@ -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);
index 0e6cc6bd76275722e0b3ab190cac49fb6db2bb6d..11668c96b7c5ba4e0f91e4d171d1460342fc1005 100644 (file)
@@ -46,6 +46,7 @@ void lib_init(void)
 
        data_stack_init();
        imem_init();
+       hostpid_init();
 }
 
 void lib_deinit(void)