skypiax: maybe braking cpu loop in case of broken Xlib?
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16015 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b2694f2c4b
commit
a16583b45a
|
@ -1774,8 +1774,10 @@ void *skypiax_do_skypeapi_thread_func(void *obj)
|
||||||
switch (an_event.type) {
|
switch (an_event.type) {
|
||||||
case ClientMessage:
|
case ClientMessage:
|
||||||
|
|
||||||
if (an_event.xclient.format != 8)
|
if (an_event.xclient.format != 8){
|
||||||
|
skypiax_sleep(100); //0.1 msec
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < 20 && an_event.xclient.data.b[i] != '\0'; ++i)
|
for (i = 0; i < 20 && an_event.xclient.data.b[i] != '\0'; ++i)
|
||||||
buf[i] = an_event.xclient.data.b[i];
|
buf[i] = an_event.xclient.data.b[i];
|
||||||
|
@ -1813,10 +1815,13 @@ void *skypiax_do_skypeapi_thread_func(void *obj)
|
||||||
SKYPIAX_P_LOG, buf);
|
SKYPIAX_P_LOG, buf);
|
||||||
skypiax_sleep(1000000); //1 sec
|
skypiax_sleep(1000000); //1 sec
|
||||||
}
|
}
|
||||||
|
skypiax_sleep(100); //0.1 msec
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(continue_is_broken){
|
if(continue_is_broken){
|
||||||
|
XFlush(disp);
|
||||||
|
skypiax_sleep(100); //0.1 msec
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1839,8 +1844,10 @@ void *skypiax_do_skypeapi_thread_func(void *obj)
|
||||||
there_were_continues = 0;
|
there_were_continues = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skypiax_sleep(100); //0.1 msec
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
skypiax_sleep(100); //0.1 msec
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue