libpurple/protocols/zephyr/ZPending.c

changeset 31294
73607ab89c6f
parent 15435
4b933b06d75e
child 40166
811f82db29dd
equal deleted inserted replaced
31293:169eeb43b52c 31294:73607ab89c6f
3 * 3 *
4 * Created by: Robert French 4 * Created by: Robert French
5 * 5 *
6 * Copyright (c) 1987 by the Massachusetts Institute of Technology. 6 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
7 * For copying and distribution information, see the file 7 * For copying and distribution information, see the file
8 * "mit-copyright.h". 8 * "mit-copyright.h".
9 */ 9 */
10 10
11 #include "internal.h" 11 #include "internal.h"
12 12
13 int ZPending() 13 int ZPending()
14 { 14 {
15 int retval; 15 int retval;
16 16
17 if (ZGetFD() < 0) { 17 if (ZGetFD() < 0) {
18 errno = ZERR_NOPORT; 18 errno = ZERR_NOPORT;
19 return (-1); 19 return (-1);
20 } 20 }
21 21
22 if ((retval = Z_ReadEnqueue()) != ZERR_NONE) { 22 if ((retval = Z_ReadEnqueue()) != ZERR_NONE) {
23 errno = retval; 23 errno = retval;
24 return (-1); 24 return (-1);
25 } 25 }
26 26
27 return(ZQLength()); 27 return(ZQLength());
28 } 28 }

mercurial