From c79cd67deec03601031d0a2046647360a3614f72 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 14 Sep 2006 21:12:39 +0000 Subject: [PATCH] no data means bad read git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2703 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 4653f87d3f..ab64703c37 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -908,9 +908,14 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f } } - + switch_clear_flag_locked(tech_pvt, TFLAG_READING); + if (tech_pvt->read_frame.datalen == 0) { + *frame = NULL; + return SWITCH_STATUS_GENERR; + } + *frame = &tech_pvt->read_frame; return SWITCH_STATUS_SUCCESS;