From fbff497e69139d7cd8434112d6f0a36a46350da1 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Fri, 27 Jul 2012 12:16:18 -0400 Subject: Issue a warning if the parser take_control_of function fails. --- io.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 2f3c5f85..5255f84f 100644 --- a/io.c +++ b/io.c @@ -2622,8 +2622,11 @@ find_input_parser(IOBUF *iop) } } - if (ip != NULL) - ip->take_control_of(& iop->public); + if (ip != NULL) { + if (! ip->take_control_of(& iop->public)) + warning(_("input parser `%s' failed to open `%s'."), + ip->name, iop->public.name); + } } /* iop_alloc --- allocate an IOBUF structure for an open fd */ -- cgit v1.2.3