queue.c (111823) | queue.c (112810) |
---|---|
1/* 2 * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 */ 13 14#include <sendmail.h> 15 | 1/* 2 * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers. 3 * All rights reserved. 4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. 5 * Copyright (c) 1988, 1993 6 * The Regents of the University of California. All rights reserved. 7 * 8 * By using this file, you agree to the terms and conditions set 9 * forth in the LICENSE file which can be found at the top level of 10 * the sendmail distribution. 11 * 12 */ 13 14#include <sendmail.h> 15 |
16SM_RCSID("@(#)$Id: queue.c,v 8.863.2.28 2003/02/11 17:17:22 ca Exp $") | 16SM_RCSID("@(#)$Id: queue.c,v 8.863.2.30 2003/03/20 00:20:16 ca Exp $") |
17 18#include <dirent.h> 19 20# define RELEASE_QUEUE (void) 0 21# define ST_INODE(st) (st).st_ino 22 23 24/* 25** Historical notes: 26** QF_VERSION == 4 was sendmail 8.10/8.11 without _FFR_QUEUEDELAY 27** QF_VERSION == 5 was sendmail 8.10/8.11 with _FFR_QUEUEDELAY 28** QF_VERSION == 6 is sendmail 8.12 without _FFR_QUEUEDELAY 29** QF_VERSION == 7 is sendmail 8.12 with _FFR_QUEUEDELAY 30*/ 31 32#if _FFR_QUEUEDELAY 33# define QF_VERSION 7 /* version number of this queue format */ 34static time_t queuedelay __P((ENVELOPE *)); | 17 18#include <dirent.h> 19 20# define RELEASE_QUEUE (void) 0 21# define ST_INODE(st) (st).st_ino 22 23 24/* 25** Historical notes: 26** QF_VERSION == 4 was sendmail 8.10/8.11 without _FFR_QUEUEDELAY 27** QF_VERSION == 5 was sendmail 8.10/8.11 with _FFR_QUEUEDELAY 28** QF_VERSION == 6 is sendmail 8.12 without _FFR_QUEUEDELAY 29** QF_VERSION == 7 is sendmail 8.12 with _FFR_QUEUEDELAY 30*/ 31 32#if _FFR_QUEUEDELAY 33# define QF_VERSION 7 /* version number of this queue format */ 34static time_t queuedelay __P((ENVELOPE *)); |
35#define queuedelay_qfver_unsupported(qfver) false | 35# define queuedelay_qfver_unsupported(qfver) false |
36#else /* _FFR_QUEUEDELAY */ 37# define QF_VERSION 6 /* version number of this queue format */ 38# define queuedelay(e) MinQueueAge | 36#else /* _FFR_QUEUEDELAY */ 37# define QF_VERSION 6 /* version number of this queue format */ 38# define queuedelay(e) MinQueueAge |
39#define queuedelay_qfver_unsupported(qfver) ((qfver) == 5 || (qfver) == 7) | 39# define queuedelay_qfver_unsupported(qfver) ((qfver) == 5 || (qfver) == 7) |
40#endif /* _FFR_QUEUEDELAY */ 41#if _FFR_QUARANTINE 42static char queue_letter __P((ENVELOPE *, int)); 43static bool quarantine_queue_item __P((int, int, ENVELOPE *, char *)); 44#endif /* _FFR_QUARANTINE */ 45 46/* Naming convention: qgrp: index of queue group, qg: QUEUEGROUP */ 47 --- 166 unchanged lines hidden (view full) --- 214 215/* offset for PRSATmpCnt */ 216# define OFF_RSA_TMP_CNT(p) (((char *) (p)) + SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int)) 217int *PRSATmpCnt; 218 219/* offset for queue_shm */ 220# define OFF_QUEUE_SHM(p) (((char *) (p)) + SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int) * 2) 221 | 40#endif /* _FFR_QUEUEDELAY */ 41#if _FFR_QUARANTINE 42static char queue_letter __P((ENVELOPE *, int)); 43static bool quarantine_queue_item __P((int, int, ENVELOPE *, char *)); 44#endif /* _FFR_QUARANTINE */ 45 46/* Naming convention: qgrp: index of queue group, qg: QUEUEGROUP */ 47 --- 166 unchanged lines hidden (view full) --- 214 215/* offset for PRSATmpCnt */ 216# define OFF_RSA_TMP_CNT(p) (((char *) (p)) + SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int)) 217int *PRSATmpCnt; 218 219/* offset for queue_shm */ 220# define OFF_QUEUE_SHM(p) (((char *) (p)) + SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int) * 2) 221 |
222#define QSHM_ENTRIES(i) QShm[i].qs_entries | 222# define QSHM_ENTRIES(i) QShm[i].qs_entries |
223 224/* basic size of shared memory segment */ 225# define SM_T_SIZE (SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int) * 2) 226 227static unsigned int hash_q __P((char *, unsigned int)); 228 229/* 230** HASH_Q -- simple hash function --- 3080 unchanged lines hidden (view full) --- 3311 for (cnt = 0; cnt < len; ++cnt) 3312 rev[cnt] = fwd[len - cnt - 1]; 3313 rev[len] = '\0'; 3314 return rev; 3315} 3316 3317#if _FFR_RHS 3318 | 223 224/* basic size of shared memory segment */ 225# define SM_T_SIZE (SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int) * 2) 226 227static unsigned int hash_q __P((char *, unsigned int)); 228 229/* 230** HASH_Q -- simple hash function --- 3080 unchanged lines hidden (view full) --- 3311 for (cnt = 0; cnt < len; ++cnt) 3312 rev[cnt] = fwd[len - cnt - 1]; 3313 rev[len] = '\0'; 3314 return rev; 3315} 3316 3317#if _FFR_RHS 3318 |
3319#define NASCII 128 3320#define NCHAR 256 | 3319# define NASCII 128 3320# define NCHAR 256 |
3321 3322static unsigned char ShuffledAlphabet[NCHAR]; 3323 3324void 3325init_shuffle_alphabet() 3326{ 3327 static bool init = false; 3328 int i; --- 5304 unchanged lines hidden --- | 3321 3322static unsigned char ShuffledAlphabet[NCHAR]; 3323 3324void 3325init_shuffle_alphabet() 3326{ 3327 static bool init = false; 3328 int i; --- 5304 unchanged lines hidden --- |