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:
Giovanni Maruzzelli 2009-12-22 13:20:34 +00:00
parent b2694f2c4b
commit a16583b45a
1 changed files with 8 additions and 1 deletions

View File

@ -1774,8 +1774,10 @@ void *skypiax_do_skypeapi_thread_func(void *obj)
switch (an_event.type) {
case ClientMessage:
if (an_event.xclient.format != 8)
if (an_event.xclient.format != 8){
skypiax_sleep(100); //0.1 msec
break;
}
for (i = 0; i < 20 && an_event.xclient.data.b[i] != '\0'; ++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_sleep(1000000); //1 sec
}
skypiax_sleep(100); //0.1 msec
break;
}
}
if(continue_is_broken){
XFlush(disp);
skypiax_sleep(100); //0.1 msec
continue;
}
@ -1839,8 +1844,10 @@ void *skypiax_do_skypeapi_thread_func(void *obj)
there_were_continues = 0;
}
skypiax_sleep(100); //0.1 msec
break;
default:
skypiax_sleep(100); //0.1 msec
break;
}
}