[PATCH] lib/util/charset: reduce loglevel for push_ucs2_talloc error
Ralph Böhme
rb at sernet.de
Mon Jul 13 11:30:51 UTC 2015
Hi,
attached is another patch that deals with excessive log spamming.
Please review and push if ok. Thanks!
-Ralph
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de
-------------- next part --------------
From 48445ea756d3caef6b1ff6f99172a732d96afffe Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Mon, 13 Jul 2015 12:51:46 +0200
Subject: [PATCH] lib/util/charset: reduce loglevel for push_ucs2_talloc error
push_ucs2_talloc() may have failed because of EILSEQ, not a failing
malloc. Log the failure with DBG_WARNING instead of level 0.
Signed-off-by: Ralph Boehme <slow at samba.org>
---
lib/util/charset/util_str.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/util/charset/util_str.c b/lib/util/charset/util_str.c
index 33466ec..c1b81f1 100644
--- a/lib/util/charset/util_str.c
+++ b/lib/util/charset/util_str.c
@@ -545,13 +545,13 @@ char *strstr_m(const char *src, const char *findstr)
frame = talloc_stackframe();
if (!push_ucs2_talloc(frame, &src_w, src, &converted_size)) {
- DEBUG(0,("strstr_m: src malloc fail\n"));
+ DBG_WARNING("strstr_m: src malloc fail\n");
TALLOC_FREE(frame);
return NULL;
}
if (!push_ucs2_talloc(frame, &find_w, findstr, &converted_size)) {
- DEBUG(0,("strstr_m: find malloc fail\n"));
+ DBG_WARNING("strstr_m: find malloc fail\n");
TALLOC_FREE(frame);
return NULL;
}
--
1.9.1
More information about the samba-technical
mailing list