mirror of /home/gitosis/repositories/libowfat.git
more error messages in io5 test
This commit is contained in:
parent
2e1b8aef8e
commit
3587b749d1
21
test/io5.c
21
test/io5.c
|
@ -9,10 +9,25 @@ main() {
|
|||
uint32 scope_id;
|
||||
char ip[16];
|
||||
uint16 port;
|
||||
if (socket_bind6_reuse(s,V6any,1234,0)==-1) return 111;
|
||||
if (socket_listen(s,16)==-1) return 111;
|
||||
if (socket_bind6_reuse(s,V6any,1234,0)==-1) {
|
||||
buffer_puts(buffer_2,"socket_bind6_reuse: ");
|
||||
buffer_puterror(buffer_2);
|
||||
buffer_putnlflush(buffer_2);
|
||||
return 111;
|
||||
}
|
||||
if (socket_listen(s,16)==-1) {
|
||||
buffer_puts(buffer_2,"socket_listen: ");
|
||||
buffer_puterror(buffer_2);
|
||||
buffer_putnlflush(buffer_2);
|
||||
return 111;
|
||||
}
|
||||
io_nonblock(s);
|
||||
if (!io_fd(s)) return 111;
|
||||
if (!io_fd(s)) {
|
||||
buffer_puts(buffer_2,"io_fd: ");
|
||||
buffer_puterror(buffer_2);
|
||||
buffer_putnlflush(buffer_2);
|
||||
return 111;
|
||||
}
|
||||
io_wantread(s);
|
||||
buffer_puts(buffer_2,"listening on port 1234 (fd #");
|
||||
buffer_putulong(buffer_2,s);
|
||||
|
|
Loading…
Reference in New Issue