Deleted Added
full compact
milter.c (80785) milter.c (82017)
1/*
2 * Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 *
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
8 *
9 */
10
11#ifndef lint
1/*
2 * Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 *
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
8 *
9 */
10
11#ifndef lint
12static char id[] = "@(#)$Id: milter.c,v 8.50.4.51 2001/07/20 00:53:01 gshapiro Exp $";
12static char id[] = "@(#)$Id: milter.c,v 8.50.4.53 2001/08/15 02:01:03 ca Exp $";
13#endif /* ! lint */
14
15#if _FFR_MILTER
16
17# include <sendmail.h>
18# include <errno.h>
19# include <sys/time.h>
20

--- 1074 unchanged lines hidden (view full) ---

1095 syserr("name required for mail filter");
1096 return;
1097 }
1098 m = (struct milter *)xalloc(sizeof *m);
1099 memset((char *) m, '\0', sizeof *m);
1100 m->mf_name = newstr(line);
1101 m->mf_state = SMFS_READY;
1102 m->mf_sock = -1;
13#endif /* ! lint */
14
15#if _FFR_MILTER
16
17# include <sendmail.h>
18# include <errno.h>
19# include <sys/time.h>
20

--- 1074 unchanged lines hidden (view full) ---

1095 syserr("name required for mail filter");
1096 return;
1097 }
1098 m = (struct milter *)xalloc(sizeof *m);
1099 memset((char *) m, '\0', sizeof *m);
1100 m->mf_name = newstr(line);
1101 m->mf_state = SMFS_READY;
1102 m->mf_sock = -1;
1103 m->mf_timeout[SMFTO_CONNECT] = (time_t) 0;
1103 m->mf_timeout[SMFTO_CONNECT] = (time_t) 0;
1104 m->mf_timeout[SMFTO_WRITE] = (time_t) 10;
1105 m->mf_timeout[SMFTO_READ] = (time_t) 10;
1106 m->mf_timeout[SMFTO_EOM] = (time_t) 300;
1107
1108 /* now scan through and assign info from the fields */
1109 while (*p != '\0')
1110 {
1111 char *delimptr;

--- 15 unchanged lines hidden (view full) ---

1127 p++;
1128
1129 /* p now points to the field body */
1130 p = munchstring(p, &delimptr, ',');
1131
1132 /* install the field into the filter struct */
1133 switch (fcode)
1134 {
1104 m->mf_timeout[SMFTO_WRITE] = (time_t) 10;
1105 m->mf_timeout[SMFTO_READ] = (time_t) 10;
1106 m->mf_timeout[SMFTO_EOM] = (time_t) 300;
1107
1108 /* now scan through and assign info from the fields */
1109 while (*p != '\0')
1110 {
1111 char *delimptr;

--- 15 unchanged lines hidden (view full) ---

1127 p++;
1128
1129 /* p now points to the field body */
1130 p = munchstring(p, &delimptr, ',');
1131
1132 /* install the field into the filter struct */
1133 switch (fcode)
1134 {
1135 case 'C':
1136 m->mf_timeout[SMFTO_CONNECT] = convtime(p, 's');
1137 break;
1138
1139 case 'S': /* socket */
1140 if (p == NULL)
1141 m->mf_conn = NULL;
1142 else
1143 m->mf_conn = newstr(p);
1144 break;
1145
1146 case 'F': /* Milter flags configured on MTA */

--- 129 unchanged lines hidden (view full) ---

1276 p++;
1277
1278 /* p now points to the field body */
1279 p = munchstring(p, &delimptr, ';');
1280
1281 /* install the field into the filter struct */
1282 switch (fcode)
1283 {
1135 case 'S': /* socket */
1136 if (p == NULL)
1137 m->mf_conn = NULL;
1138 else
1139 m->mf_conn = newstr(p);
1140 break;
1141
1142 case 'F': /* Milter flags configured on MTA */

--- 129 unchanged lines hidden (view full) ---

1272 p++;
1273
1274 /* p now points to the field body */
1275 p = munchstring(p, &delimptr, ';');
1276
1277 /* install the field into the filter struct */
1278 switch (fcode)
1279 {
1280 case 'C':
1281 m->mf_timeout[SMFTO_CONNECT] = convtime(p, 's');
1282 if (tTd(64, 5))
1283 printf("X%s: %c=%ld\n",
1284 m->mf_name, fcode,
1285 (u_long) m->mf_timeout[SMFTO_CONNECT]);
1286 break;
1287
1284 case 'S':
1285 m->mf_timeout[SMFTO_WRITE] = convtime(p, 's');
1286 if (tTd(64, 5))
1287 printf("X%s: %c=%ld\n",
1288 m->mf_name, fcode,
1289 (u_long) m->mf_timeout[SMFTO_WRITE]);
1290 break;
1291

--- 2264 unchanged lines hidden ---
1288 case 'S':
1289 m->mf_timeout[SMFTO_WRITE] = convtime(p, 's');
1290 if (tTd(64, 5))
1291 printf("X%s: %c=%ld\n",
1292 m->mf_name, fcode,
1293 (u_long) m->mf_timeout[SMFTO_WRITE]);
1294 break;
1295

--- 2264 unchanged lines hidden ---