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 @@
-/* This file is part of GNU Pies.
+/* This file is part of GNU Pies testsuite.
Copyright (C) 2019 Sergey Poznyakoff
GNU Pies is free software; you can redistribute it and/or modify
@@ -272,15 +272,15 @@ netcat (char const *urlstr)
& (srv->state | ((srv->state & POLLOUT) ? POLLHUP : 0)));
if (events)
{
+ if (events & POLLIN)
+ netcat_stream_read (srv);
+ if (events & POLLOUT)
+ netcat_stream_write (srv);
if (events & POLLHUP)
{
//grecs_error (NULL, 0, "HUP on %s", srv->id);
netcat_stream_disconnect (srv, srv->state);
}
- else if (events & POLLIN)
- netcat_stream_read (srv);
- else if (events & POLLOUT)
- netcat_stream_write (srv);
}
if (srv->state == 0 || srv->pollfd->fd == -1)
netcat_server_remove (srv);

Return to:

Send suggestions and report system problems to the System administrator.