Skinny: Check for socket to see if listener is alive
also, use tab to indent
This commit is contained in:
parent
542f643ef5
commit
54e73c774f
|
@ -1003,6 +1003,7 @@ uint8_t listener_is_ready(listener_t *listener)
|
||||||
{
|
{
|
||||||
return globals.running
|
return globals.running
|
||||||
&& listener
|
&& listener
|
||||||
|
&& listener->sock
|
||||||
&& switch_test_flag(listener, LFLAG_RUNNING)
|
&& switch_test_flag(listener, LFLAG_RUNNING)
|
||||||
&& listener->profile->listener_ready;
|
&& listener->profile->listener_ready;
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ switch_status_t skinny_read_packet(listener_t *listener, skinny_message_t **req)
|
||||||
|
|
||||||
ptr = mbuf;
|
ptr = mbuf;
|
||||||
|
|
||||||
while (listener->sock && listener_is_ready(listener)) {
|
while (listener_is_ready(listener)) {
|
||||||
uint8_t do_sleep = 1;
|
uint8_t do_sleep = 1;
|
||||||
if(bytes < SKINNY_MESSAGE_FIELD_SIZE) {
|
if(bytes < SKINNY_MESSAGE_FIELD_SIZE) {
|
||||||
/* We have nothing yet, get length header field */
|
/* We have nothing yet, get length header field */
|
||||||
|
|
Loading…
Reference in New Issue