|
version 3.10, 2005/10/14 15:16:11
|
version 3.11, 2007/04/05 16:08:59
|
|
|
|
| from The Open Group. | from The Open Group. |
| | |
| */ | */ |
| /* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.9tsi Exp $ */ |
/* $XFree86: xc/programs/Xserver/Xext/xcmisc.c,v 3.10tsi Exp $ */ |
| | |
| #define NEED_EVENTS | #define NEED_EVENTS |
| #define NEED_REPLIES | #define NEED_REPLIES |
|
|
|
| | |
| REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq); | REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq); |
| | |
| pids = (XID *)ALLOCATE_LOCAL(stuff->count * sizeof(XID)); |
if (stuff->count > ((CARD32)(-1) / sizeof(XID) / 2)) |
| |
return BadAlloc; |
| |
|
| |
pids = (XID *)Xalloc(stuff->count * sizeof(XID)); |
| if (!pids) | if (!pids) |
| { |
|
| return BadAlloc; | return BadAlloc; |
| } |
|
| count = GetXIDList(client, stuff->count, pids); | count = GetXIDList(client, stuff->count, pids); |
| rep.type = X_Reply; | rep.type = X_Reply; |
| rep.sequenceNumber = client->sequence; | rep.sequenceNumber = client->sequence; |
|
|
|
| swapl(&rep.count, n); | swapl(&rep.count, n); |
| } | } |
| WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep); | WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep); |
| if (count) |
if (count) { |
| { |
|
| client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; | client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; |
| WriteSwappedDataToClient(client, count * sizeof(XID), pids); | WriteSwappedDataToClient(client, count * sizeof(XID), pids); |
| } | } |
| DEALLOCATE_LOCAL(pids); |
Xfree(pids); |
| return(client->noClientException); | return(client->noClientException); |
| } | } |
| | |