| author | Julien Cristau <jcristau@debian.org> | |
| Thu, 9 Feb 2012 22:54:55 +0000 (23:54 +0100) | ||
| committer | Julien Cristau <jcristau@debian.org> | |
| Thu, 9 Feb 2012 22:56:55 +0000 (23:56 +0100) |
In one case we don't actually want to fill up our buffer. In the other
one we're looping over the recv() until we have all the data.
Debian bug#659104
Reported-by: Christoph Egger <christoph@debian.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
one we're looping over the recv() until we have all the data.
Debian bug#659104
Reported-by: Christoph Egger <christoph@debian.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
| src/xcb_in.c | patch | blob | history |
diff --git a/src/xcb_in.c b/src/xcb_in.c
--- a/src/xcb_in.c
+++ b/src/xcb_in.c
#define XCB_REPLY 1
#define XCB_XGE_EVENT 35
-/* required for compiling for Win32 using MinGW */
-#ifndef MSG_WAITALL
-#define MSG_WAITALL 0
-#endif
-
struct event_list {
xcb_generic_event_t *event;
struct event_list *next;
int done = 0;
while(done < len)
{
- int ret = recv(fd, ((char *) buf) + done, len - done,MSG_WAITALL);
+ int ret = recv(fd, ((char *) buf) + done, len - done, 0);
if(ret > 0)
done += ret;
#ifndef _WIN32
int _xcb_in_read(xcb_connection_t *c)
{
- int n = recv(c->fd, c->in.queue + c->in.queue_len, sizeof(c->in.queue) - c->in.queue_len,MSG_WAITALL);
+ int n = recv(c->fd, c->in.queue + c->in.queue_len,
+ sizeof(c->in.queue) - c->in.queue_len, 0);
if(n > 0)
c->in.queue_len += n;
while(read_packet(c))
