aboutsummaryrefslogtreecommitdiff
path: root/tests/nt.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-06-11 17:30:25 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-06-11 17:30:25 +0300
commit07e7ee3d732b60e0b7f5b242bbfb0cdec8e99e7f (patch)
treed8106ba7d4e4e92f4bb4f49427eb6e2db10897a3 /tests/nt.c
parentbf6506cdc46446eada5090a428c2407ebd17468a (diff)
downloadpies-07e7ee3d732b60e0b7f5b242bbfb0cdec8e99e7f.tar.gz
pies-07e7ee3d732b60e0b7f5b242bbfb0cdec8e99e7f.tar.bz2
Test pass-fd components
* tests/recvfd.c: New source. * tests/.gitignore: Update. * tests/passfd.at: New test. * tests/Makefile.am: Add new test. * tests/testsuite.at: Add new test. * tests/nt.c: Check all revents bits.
Diffstat (limited to 'tests/nt.c')
-rw-r--r--tests/nt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/nt.c b/tests/nt.c
index d30e447..98a4077 100644
--- a/tests/nt.c
+++ b/tests/nt.c
@@ -1,4 +1,4 @@
1/* This file is part of GNU Pies. 1/* This file is part of GNU Pies testsuite.
2 Copyright (C) 2019 Sergey Poznyakoff 2 Copyright (C) 2019 Sergey Poznyakoff
3 3
4 GNU Pies is free software; you can redistribute it and/or modify 4 GNU Pies is free software; you can redistribute it and/or modify
@@ -272,15 +272,15 @@ netcat (char const *urlstr)
272 & (srv->state | ((srv->state & POLLOUT) ? POLLHUP : 0))); 272 & (srv->state | ((srv->state & POLLOUT) ? POLLHUP : 0)));
273 if (events) 273 if (events)
274 { 274 {
275 if (events & POLLIN)
276 netcat_stream_read (srv);
277 if (events & POLLOUT)
278 netcat_stream_write (srv);
275 if (events & POLLHUP) 279 if (events & POLLHUP)
276 { 280 {
277 //grecs_error (NULL, 0, "HUP on %s", srv->id); 281 //grecs_error (NULL, 0, "HUP on %s", srv->id);
278 netcat_stream_disconnect (srv, srv->state); 282 netcat_stream_disconnect (srv, srv->state);
279 } 283 }
280 else if (events & POLLIN)
281 netcat_stream_read (srv);
282 else if (events & POLLOUT)
283 netcat_stream_write (srv);
284 } 284 }
285 if (srv->state == 0 || srv->pollfd->fd == -1) 285 if (srv->state == 0 || srv->pollfd->fd == -1)
286 netcat_server_remove (srv); 286 netcat_server_remove (srv);

Return to:

Send suggestions and report system problems to the System administrator.