From 095815f83b78ecb818b1d460cb98f96533240c7d Mon Sep 17 00:00:00 2001 From: Rupa Schomaker Date: Wed, 26 May 2010 20:57:17 -0500 Subject: [PATCH] mod_cidlookup: null xml is bad --- src/mod/applications/mod_cidlookup/mod_cidlookup.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_cidlookup/mod_cidlookup.c b/src/mod/applications/mod_cidlookup/mod_cidlookup.c index 269853eb11..dec49b0c98 100755 --- a/src/mod/applications/mod_cidlookup/mod_cidlookup.c +++ b/src/mod/applications/mod_cidlookup/mod_cidlookup.c @@ -467,7 +467,12 @@ static cid_data_t *do_whitepages_lookup(switch_memory_pool_t *pool, switch_event query = switch_event_expand_headers(event, "http://api.whitepages.com/reverse_phone/1.0/?phone=${whitepages-cid};api_key=${whitepages-api-key}"); do_lookup_url(pool, event, &xml_s, query, NULL, NULL, 0); - + + if (zstr(xml_s)) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No XML returned for number %s\n", num); + goto done; + } + xml = switch_xml_parse_str_dup(xml_s); if (!xml) {