diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-04 21:49:35 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-04 21:49:35 +0000 |
commit | 77757c8d84e0fdde04be923c8a7f3ea8cd7bcf39 (patch) | |
tree | 63683ad99b6d4ee2ec858255efa14a4b81a07b11 | |
parent | 6460de7d7ac87145594f28a416f926f830df9b8c (diff) | |
download | mailfromd-77757c8d84e0fdde04be923c8a7f3ea8cd7bcf39.tar.gz mailfromd-77757c8d84e0fdde04be923c8a7f3ea8cd7bcf39.tar.bz2 |
* configure.ac: Check for locale.h
* src/db.c, src/bi_sprintf.m4, src/prog.c, src/bi_db.m4,
src/engine.c: Fix format arguments (ported from
branches/gmach@{2008-01-28 and 2008-01-09).
* src/main.c, src/mtasim.c: Include locale.h
git-svn-id: file:///svnroot/mailfromd/trunk@1603 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | gacopyz/server.c | 5 | ||||
-rw-r--r-- | src/bi_db.m4 | 15 | ||||
-rw-r--r-- | src/bi_sprintf.m4 | 6 | ||||
-rw-r--r-- | src/db.c | 8 | ||||
-rw-r--r-- | src/engine.c | 2 | ||||
-rw-r--r-- | src/main.c | 5 | ||||
-rw-r--r-- | src/mtasim.c | 5 | ||||
-rw-r--r-- | src/prog.c | 8 |
10 files changed, 38 insertions, 26 deletions
@@ -1,6 +1,14 @@ | |||
1 | 2008-02-04 Sergey Poznyakoff <gray@gnu.org.ua> | ||
2 | |||
3 | * configure.ac: Check for locale.h | ||
4 | * src/db.c, src/bi_sprintf.m4, src/prog.c, src/bi_db.m4, | ||
5 | src/engine.c: Fix format arguments (ported from | ||
6 | branches/gmach@{2008-01-28 and 2008-01-09). | ||
7 | * src/main.c, src/mtasim.c: Include locale.h | ||
8 | |||
1 | 2008-01-21 Sergey Poznyakoff <gray@gnu.org.ua> | 9 | 2008-01-21 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 10 | ||
3 | * src/symtab.c: Ported r1584 from branches/gmach. | 11 | * src/symtab.c: Ported r1584 from branches/gmach. |
4 | * NEWS: Update. | 12 | * NEWS: Update. |
5 | * doc/mailfromd.texi: Updated. | 13 | * doc/mailfromd.texi: Updated. |
6 | * configure.ac: Version 4.3 (preparing for the release). | 14 | * configure.ac: Version 4.3 (preparing for the release). |
diff --git a/configure.ac b/configure.ac index 056f46d4..59723359 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -44,13 +44,13 @@ AC_PROG_LEX | |||
44 | 44 | ||
45 | # Checks for libraries. | 45 | # Checks for libraries. |
46 | AC_CHECK_LIB(resolv, res_query) | 46 | AC_CHECK_LIB(resolv, res_query) |
47 | 47 | ||
48 | # Checks for header files. | 48 | # Checks for header files. |
49 | AC_HEADER_STDC | 49 | AC_HEADER_STDC |
50 | AC_CHECK_HEADERS([stdlib.h unistd.h sysexits.h paths.h]) | 50 | AC_CHECK_HEADERS([stdlib.h unistd.h sysexits.h paths.h locale.h]) |
51 | 51 | ||
52 | # Checks for typedefs, structures, and compiler characteristics. | 52 | # Checks for typedefs, structures, and compiler characteristics. |
53 | AC_TYPE_SIGNAL | 53 | AC_TYPE_SIGNAL |
54 | AC_TYPE_SIZE_T | 54 | AC_TYPE_SIZE_T |
55 | AC_CHECK_SIZEOF(uint32_t) | 55 | AC_CHECK_SIZEOF(uint32_t) |
56 | AC_CHECK_SIZEOF(unsigned long) | 56 | AC_CHECK_SIZEOF(unsigned long) |
diff --git a/gacopyz/server.c b/gacopyz/server.c index a4a05e49..1c1f1085 100644 --- a/gacopyz/server.c +++ b/gacopyz/server.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* This file is part of gacopyz. | 1 | /* This file is part of gacopyz. |
2 | Copyright (C) 2007 Sergey Poznyakoff | 2 | Copyright (C) 2007, 2008 Sergey Poznyakoff |
3 | 3 | ||
4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; either version 3, or (at your option) | 6 | the Free Software Foundation; either version 3, or (at your option) |
7 | any later version. | 7 | any later version. |
8 | 8 | ||
@@ -116,13 +116,12 @@ add_def(gacopyz_srv_t srv, const char *name, size_t len, | |||
116 | } | 116 | } |
117 | 117 | ||
118 | void | 118 | void |
119 | del_def(gacopyz_srv_t srv, const char *name, size_t len) | 119 | del_def(gacopyz_srv_t srv, const char *name, size_t len) |
120 | { | 120 | { |
121 | struct gacopyz_macro_def *def = find_def(srv, name, len); | 121 | struct gacopyz_macro_def *def = find_def(srv, name, len); |
122 | size_t n; | ||
123 | 122 | ||
124 | if (!def) | 123 | if (!def) |
125 | return; | 124 | return; |
126 | 125 | ||
127 | free(def->name); | 126 | free(def->name); |
128 | free(def->value); | 127 | free(def->value); |
@@ -295,13 +294,12 @@ struct timeval default_gacopyz_timeout[GACOPYZ_TO_COUNT] = { | |||
295 | }; | 294 | }; |
296 | 295 | ||
297 | int | 296 | int |
298 | gacopyz_srv_create(gacopyz_srv_t *p, const char *name, | 297 | gacopyz_srv_create(gacopyz_srv_t *p, const char *name, |
299 | const char *portspec, unsigned logmask) | 298 | const char *portspec, unsigned logmask) |
300 | { | 299 | { |
301 | int i; | ||
302 | gacopyz_srv_t srv = calloc(1, sizeof(*srv)); | 300 | gacopyz_srv_t srv = calloc(1, sizeof(*srv)); |
303 | 301 | ||
304 | if (!srv) | 302 | if (!srv) |
305 | return MI_FAILURE; | 303 | return MI_FAILURE; |
306 | srv->id = strdup(name); | 304 | srv->id = strdup(name); |
307 | srv->portspec = strdup(portspec); | 305 | srv->portspec = strdup(portspec); |
@@ -801,13 +799,12 @@ srv_connect(gacopyz_srv_t srv, char *proto, char *port, char *path) | |||
801 | int | 799 | int |
802 | gacopyz_srv_connect(gacopyz_srv_t srv) | 800 | gacopyz_srv_connect(gacopyz_srv_t srv) |
803 | { | 801 | { |
804 | char *proto; | 802 | char *proto; |
805 | char *port; | 803 | char *port; |
806 | char *path; | 804 | char *path; |
807 | int rc; | ||
808 | 805 | ||
809 | GACOPYZ_ASSERT(srv); | 806 | GACOPYZ_ASSERT(srv); |
810 | 807 | ||
811 | gacopyz_io_log(&srv->iod, SMI_LOG_DEBUG, | 808 | gacopyz_io_log(&srv->iod, SMI_LOG_DEBUG, |
812 | _("Conecting to %s"), srv->portspec); | 809 | _("Conecting to %s"), srv->portspec); |
813 | 810 | ||
diff --git a/src/bi_db.m4 b/src/bi_db.m4 index bb0b9f48..f366008f 100644 --- a/src/bi_db.m4 +++ b/src/bi_db.m4 | |||
@@ -1,8 +1,8 @@ | |||
1 | /* This file is part of mailfromd. -*- c -*- | 1 | /* This file is part of Mailfromd. -*- c -*- |
2 | Copyright (C) 2006, 2007 Sergey Poznyakoff | 2 | Copyright (C) 2006, 2007, 2008 Sergey Poznyakoff |
3 | 3 | ||
4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
6 | the Free Software Foundation; either version 3, or (at your option) | 6 | the Free Software Foundation; either version 3, or (at your option) |
7 | any later version. | 7 | any later version. |
8 | 8 | ||
@@ -134,13 +134,13 @@ MF_DEFUN(dbdel, VOID, STRING dbname, STRING keystr, OPTIONAL, NUMBER null) | |||
134 | MU_DATUM_SIZE(key)++; | 134 | MU_DATUM_SIZE(key)++; |
135 | rc = mu_dbm_delete(&db, key); | 135 | rc = mu_dbm_delete(&db, key); |
136 | mu_dbm_close(&db); | 136 | mu_dbm_close(&db); |
137 | MF_ASSERT(rc == 0, | 137 | MF_ASSERT(rc == 0, |
138 | mf_dbfailure, | 138 | mf_dbfailure, |
139 | _("Failed to delete data `%s' from `%s': %s"), | 139 | _("Failed to delete data `%s' from `%s': %s"), |
140 | key, | 140 | keystr, |
141 | dbname, | 141 | dbname, |
142 | mu_dbm_strerror()); | 142 | mu_dbm_strerror()); |
143 | } | 143 | } |
144 | END | 144 | END |
145 | 145 | ||
146 | 146 | ||
@@ -235,15 +235,16 @@ MF_DEFUN(greylist, NUMBER, STRING email, NUMBER interval) | |||
235 | debug1(20, "greylist record for %s expired", | 235 | debug1(20, "greylist record for %s expired", |
236 | email); | 236 | email); |
237 | if (!readonly) { | 237 | if (!readonly) { |
238 | memcpy(MU_DATUM_PTR(contents), | 238 | memcpy(MU_DATUM_PTR(contents), |
239 | &now, sizeof now); | 239 | &now, sizeof now); |
240 | if (mu_dbm_insert(&db, key, contents, 1)) | 240 | if (mu_dbm_insert(&db, key, contents, 1)) |
241 | mu_error(_("Cannot insert datum `%s' in " | 241 | mu_error(_("Cannot insert datum `%-.*s' in " |
242 | "greylist database %s: %s"), | 242 | "greylist database %s: %s"), |
243 | key, | 243 | MU_DATUM_SIZE(key), |
244 | (char*)MU_DATUM_PTR(key), | ||
244 | greylist_format->dbname, | 245 | greylist_format->dbname, |
245 | mu_dbm_strerror()); | 246 | mu_dbm_strerror()); |
246 | } else | 247 | } else |
247 | debug(20, "database opened in readonly mode: " | 248 | debug(20, "database opened in readonly mode: " |
248 | "not updating"); | 249 | "not updating"); |
249 | rc = 1; | 250 | rc = 1; |
@@ -256,15 +257,15 @@ MF_DEFUN(greylist, NUMBER, STRING email, NUMBER interval) | |||
256 | } else if (!readonly) { | 257 | } else if (!readonly) { |
257 | debug1(20, "greylisting %s", email); | 258 | debug1(20, "greylisting %s", email); |
258 | MF_VAR_REF(greylist_seconds_left, interval); | 259 | MF_VAR_REF(greylist_seconds_left, interval); |
259 | MU_DATUM_PTR(contents) = (void*)&now; | 260 | MU_DATUM_PTR(contents) = (void*)&now; |
260 | MU_DATUM_SIZE(contents) = sizeof now; | 261 | MU_DATUM_SIZE(contents) = sizeof now; |
261 | if (mu_dbm_insert(&db, key, contents, 1)) | 262 | if (mu_dbm_insert(&db, key, contents, 1)) |
262 | mu_error(_("Cannot insert datum `%s' in greylist " | 263 | mu_error(_("Cannot insert datum `%-.*s' in greylist " |
263 | "database %s: %s"), | 264 | "database %s: %s"), |
264 | key, | 265 | MU_DATUM_SIZE(key), (char*)MU_DATUM_PTR(key), |
265 | greylist_format->dbname, | 266 | greylist_format->dbname, |
266 | mu_dbm_strerror()); | 267 | mu_dbm_strerror()); |
267 | rc = 1; | 268 | rc = 1; |
268 | } else | 269 | } else |
269 | rc = 0; | 270 | rc = 0; |
270 | 271 | ||
diff --git a/src/bi_sprintf.m4 b/src/bi_sprintf.m4 index 3f3f434d..afd63d32 100644 --- a/src/bi_sprintf.m4 +++ b/src/bi_sprintf.m4 | |||
@@ -1,8 +1,8 @@ | |||
1 | /* This file is part of mailfromd. -*- c -*- | 1 | /* This file is part of Mailfromd. -*- c -*- |
2 | Copyright (C) 2007 Sergey Poznyakoff | 2 | Copyright (C) 2007, 2008 Sergey Poznyakoff |
3 | 3 | ||
4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU |