src.lock_maildirsize
changeset 13 311a14a1961e
parent 11 203878d58792
child 14 6233ac1f9517
equal deleted inserted replaced
12:1c01680ee818 13:311a14a1961e
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent 148c0a8c561d4cc98dd473167fa50d2c59760400
     2 # Parent 52fd74447005c5bef643b4dbe767791d334312ad
     3 
     3 
     4 diff -r 148c0a8c561d OS/Makefile-Linux
     4 diff -r 52fd74447005 OS/Makefile-Linux
     5 --- a/OS/Makefile-Linux	Thu Feb 24 17:15:25 2011 +0100
     5 --- a/OS/Makefile-Linux	Thu Feb 24 17:19:04 2011 +0100
     6 +++ b/OS/Makefile-Linux	Thu Feb 24 17:17:37 2011 +0100
     6 +++ b/OS/Makefile-Linux	Thu Feb 24 17:20:54 2011 +0100
     7 @@ -16,7 +16,7 @@
     7 @@ -16,7 +16,7 @@
     8  DBMLIB = -ldb
     8  DBMLIB = -ldb
     9  USE_DB = yes
     9  USE_DB = yes
    10  
    10  
    11 -LIBS = -lnsl -lcrypt -lm
    11 -LIBS = -lnsl -lcrypt -lm
    12 +LIBS = -lnsl -lcrypt -lm -lrt
    12 +LIBS = -lnsl -lcrypt -lm -lrt
    13  LIBRESOLV = -lresolv
    13  LIBRESOLV = -lresolv
    14  
    14  
    15  X11=/usr/X11R6
    15  X11=/usr/X11R6
    16 diff -r 148c0a8c561d src/transports/appendfile.c
    16 diff -r 52fd74447005 src/transports/appendfile.c
    17 --- a/src/transports/appendfile.c	Thu Feb 24 17:15:25 2011 +0100
    17 --- a/src/transports/appendfile.c	Thu Feb 24 17:19:04 2011 +0100
    18 +++ b/src/transports/appendfile.c	Thu Feb 24 17:17:37 2011 +0100
    18 +++ b/src/transports/appendfile.c	Thu Feb 24 17:20:54 2011 +0100
    19 @@ -13,6 +13,7 @@
    19 @@ -13,6 +13,7 @@
    20  
    20  
    21  #ifdef SUPPORT_MAILDIR
    21  #ifdef SUPPORT_MAILDIR
    22  #include "tf_maildir.h"
    22  #include "tf_maildir.h"
    23 +extern int lockfd;				/* from tf_maildir */	// hs12
    23 +extern int lockfd;				/* from tf_maildir */	// hs12
   133 +	(void)close(lockfd);
   133 +	(void)close(lockfd);
   134 +	}
   134 +	}
   135  
   135  
   136  #ifdef SUPPORT_MBX
   136  #ifdef SUPPORT_MBX
   137  if (mbx_lockfd >= 0)
   137  if (mbx_lockfd >= 0)
   138 diff -r 148c0a8c561d src/transports/appendfile.h
   138 diff -r 52fd74447005 src/transports/appendfile.h
   139 --- a/src/transports/appendfile.h	Thu Feb 24 17:15:25 2011 +0100
   139 --- a/src/transports/appendfile.h	Thu Feb 24 17:19:04 2011 +0100
   140 +++ b/src/transports/appendfile.h	Thu Feb 24 17:17:37 2011 +0100
   140 +++ b/src/transports/appendfile.h	Thu Feb 24 17:20:54 2011 +0100
   141 @@ -95,5 +95,8 @@
   141 @@ -95,5 +95,8 @@
   142  /* Function that is shared with tf_maildir.c */
   142  /* Function that is shared with tf_maildir.c */
   143  
   143  
   144  extern off_t  check_dir_size(uschar *, int *, const pcre *);
   144  extern off_t  check_dir_size(uschar *, int *, const pcre *);
   145 +extern int apply_lock(int fd, int fcntltype, BOOL dofcntl, int fcntltime, BOOL doflock,
   145 +extern int apply_lock(int fd, int fcntltype, BOOL dofcntl, int fcntltime, BOOL doflock,
   146 +    int flocktime);
   146 +    int flocktime);
   147 +
   147 +
   148  
   148  
   149  /* End of transports/appendfile.h */
   149  /* End of transports/appendfile.h */
   150 diff -r 148c0a8c561d src/transports/tf_maildir.c
   150 diff -r 52fd74447005 src/transports/tf_maildir.c
   151 --- a/src/transports/tf_maildir.c	Thu Feb 24 17:15:25 2011 +0100
   151 --- a/src/transports/tf_maildir.c	Thu Feb 24 17:19:04 2011 +0100
   152 +++ b/src/transports/tf_maildir.c	Thu Feb 24 17:17:37 2011 +0100
   152 +++ b/src/transports/tf_maildir.c	Thu Feb 24 17:20:54 2011 +0100
   153 @@ -367,13 +367,16 @@
   153 @@ -367,13 +367,16 @@
   154  
   154  
   155  Returns:           >=0  a file descriptor for an open maildirsize file
   155  Returns:           >=0  a file descriptor for an open maildirsize file
   156                     -1   there was an error opening or accessing the file
   156                     -1   there was an error opening or accessing the file
   157 +				        or locking
   157 +				        or locking
   272  /* Return the sizes and the file descriptor, if any */
   272  /* Return the sizes and the file descriptor, if any */
   273 -
   273 -
   274  DEBUG(D_transport) debug_printf("returning maildir size=" OFF_T_FMT
   274  DEBUG(D_transport) debug_printf("returning maildir size=" OFF_T_FMT
   275    " filecount=%d\n", size, filecount);
   275    " filecount=%d\n", size, filecount);
   276  *returned_size = size;
   276  *returned_size = size;
       
   277 diff -r 52fd74447005 src/transports/tf_maildir.h
       
   278 --- a/src/transports/tf_maildir.h	Thu Feb 24 17:19:04 2011 +0100
       
   279 +++ b/src/transports/tf_maildir.h	Thu Feb 24 17:20:54 2011 +0100
       
   280 @@ -16,7 +16,7 @@
       
   281                  uschar *);
       
   282  extern int    maildir_ensure_sizefile(uschar *,
       
   283                  appendfile_transport_options_block *, const pcre *,
       
   284 -                const pcre *, off_t *, int *);
       
   285 +                const pcre *, off_t *, int *, uschar **);
       
   286  extern void   maildir_record_length(int, int);
       
   287  
       
   288  /* End of tf_maildir.h */