]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
no data means bad read
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 14 Sep 2006 21:12:39 +0000 (21:12 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 14 Sep 2006 21:12:39 +0000 (21:12 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2703 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 4653f87d3f32b31d6ace948e9165eaff1fadc19c..ab64703c374f44883bbbcbc35572ba11b5147dd1 100644 (file)
@@ -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;