diff options
author | dscho <dscho> | 2004-05-05 19:42:27 +0000 |
---|---|---|
committer | dscho <dscho> | 2004-05-05 19:42:27 +0000 |
commit | f5cfa4bc8d73f16e963f4a2aa99f63614f7da758 (patch) | |
tree | 1feb70ded7d43c476d077d75fc1b9171797e93f6 /sockets.c | |
parent | 1c7ca906f7971bc45a90f425d5d8754ddd5eb1d7 (diff) | |
download | libtdevnc-f5cfa4bc8d73f16e963f4a2aa99f63614f7da758.tar.gz libtdevnc-f5cfa4bc8d73f16e963f4a2aa99f63614f7da758.zip |
prevent segmentation fault when requested area is too big; if select is interrupted while WriteExact, just try again.
Diffstat (limited to 'sockets.c')
-rw-r--r-- | sockets.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -499,7 +499,9 @@ WriteExact(cl, buf, len) tv.tv_sec = 5; tv.tv_usec = 0; n = select(sock+1, NULL, &fds, NULL /* &fds */, &tv); - if (n < 0) { + if (n < 0) { + if(errno==EINTR) + continue; rfbLogPerror("WriteExact: select"); UNLOCK(cl->outputMutex); return n; |