mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 21:17:06 +00:00
fix SFSIP-37
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6481 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
0f1d4b9a70
commit
1bbb57a82c
4 files changed
+41
-95
No files matched your search
@@ -352,10 +352,16 @@ static switch_status_t read_packet(listener_t * listener, switch_event_t **event
|
||||
char *ptr;
|
||||
uint8_t crcount = 0;
|
||||
uint32_t max_len = sizeof(mbuf);
|
||||
switch_channel_t *channel = NULL;
|
||||
*event = NULL;
|
||||
start = time(NULL);
|
||||
ptr = mbuf;
|
||||
|
||||
|
||||
if (listener->session) {
|
||||
channel = switch_core_session_get_channel(listener->session);
|
||||
}
|
||||
|
||||
while (listener->sock && !prefs.done) {
|
||||
uint8_t do_sleep = 1;
|
||||
mlen = 1;
|
||||
@@ -365,7 +371,7 @@ static switch_status_t read_packet(listener_t * listener, switch_event_t **event
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
if (listener->session && !switch_channel_ready(switch_core_session_get_channel(listener->session))) {
|
||||
if (channel && !switch_channel_ready(channel)) {
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user