diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-10-10 10:26:44 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-10-10 10:26:44 +0000 |
commit | abba405eb603deaf69e31701464d8fdeb3aa1f2c (patch) | |
tree | 0c28b035774349a96eeffaad6be7fd95724679e7 | |
parent | 589ccfd9dfd9e12438fa4bf8d98472709a00283e (diff) | |
download | mailfromd-abba405eb603deaf69e31701464d8fdeb3aa1f2c.tar.gz mailfromd-abba405eb603deaf69e31701464d8fdeb3aa1f2c.tar.bz2 |
* src/mailfromd.h [!ENABLE_NLS] (bindtextdomain): Fix definition.
* src/cache.c (cache_get2): Fix misplaced variable definition.
git-svn-id: file:///svnroot/mailfromd/trunk@1514 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/cache.c | 5 | ||||
-rw-r--r-- | src/mailfromd.h | 2 |
3 files changed, 7 insertions, 3 deletions
@@ -1,8 +1,11 @@ 2007-10-10 Sergey Poznyakoff <gray@gnu.org.ua> + * src/mailfromd.h [!ENABLE_NLS] (bindtextdomain): Fix definition. + * src/cache.c (cache_get2): Fix misplaced variable definition. + * src/dnsbase.c (dns_resolve_hostname): Remove stray free, left over after 2007-09-03. 2007-09-13 Sergey Poznyakoff <gray@gnu.org.ua> * src/prog.c (heap_obstack_grow): Bugfix. The condition didn't diff --git a/src/cache.c b/src/cache.c index 26a0c809..2bc63025 100644 --- a/src/cache.c +++ b/src/cache.c @@ -151,17 +151,18 @@ cache_expire_item(const void *content) mf_status cache_get2(char *email, char *client_addr) { mf_status rc = mf_failure; size_t size; - + char *key; + if (!cache_format->enabled) return mf_failure; size = strlen(email) + 1 + strlen(client_addr) + 1; - char *key = malloc(size); + key = malloc(size); if (key) { strcat(strcat(strcpy(key, email), ":"), client_addr); rc = cache_get(key); free(key); } return rc; diff --git a/src/mailfromd.h b/src/mailfromd.h index 7ce0f898..faf96d25 100644 --- a/src/mailfromd.h +++ b/src/mailfromd.h @@ -63,13 +63,13 @@ # define _(String) (String) # define N_(String) String # define gettext(msgid) (msgid) # define dgettext(domain, msgid) (msgid) # define ngettext(sg,pl,cnt) (cnt == 1) ? (sg) : (pl) # define textdomain(Domain) -# define bindtextdomain(Package, Directory) +# define bindtextdomain(Package, Directory) (char*) ((errno = ENOSYS),NULL) #endif /* ENABLE_NLS */ /* Status values used throughout the program */ typedef enum mf_status_code { mf_success, mf_not_found, |