summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel <danieruru@gmail.com>2013-01-10 20:13:47 +0900
committerdaniel <danieruru@gmail.com>2013-01-10 20:13:47 +0900
commit0e75195fd93cb3e4eb0c1e29eca11894edf5c076 (patch)
tree651009693f851bada8aa151e88d3dd6bb51fbfad
parentb38f3285a31547b528c0767bc268242ad0bed7fa (diff)
remove the sleep
-rw-r--r--libvxi11client/libvxi11client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libvxi11client/libvxi11client.c b/libvxi11client/libvxi11client.c
index 7c7878c..cf57f17 100644
--- a/libvxi11client/libvxi11client.c
+++ b/libvxi11client/libvxi11client.c
@@ -400,11 +400,12 @@ int vxi11_create_intr_chan() {
return 0;
interruptchannelopen = true;
- u_short port = 0;
+ u_short port = -1;
g_thread_init(NULL);
interruptthread = g_thread_create(interruptthreadfunc, &port, true, NULL);
- sleep(2);
+ while (port == -1) { // spin
+ };
struct sockaddr_in myaddress;
get_myaddress(&myaddress);