aboutsummaryrefslogtreecommitdiffstats
path: root/sualibrary/testup/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sualibrary/testup/main.cpp')
-rw-r--r--sualibrary/testup/main.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/sualibrary/testup/main.cpp b/sualibrary/testup/main.cpp
index c032d62..fbcd983 100644
--- a/sualibrary/testup/main.cpp
+++ b/sualibrary/testup/main.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
/*
- * $Id: main.cpp,v 1.1.1.1 2002/02/04 14:30:42 p82609 Exp $
+ * $Id: main.cpp,v 1.2 2002/10/15 14:37:59 p82609 Exp $
*
* SUA Test user part implementation.
*
@@ -73,6 +73,15 @@
#include <arpa/inet.h>
#include <sys/utsname.h>
+#ifdef HAVE_SYS_POLL_H
+ #include <sys/poll.h>
+#else
+ #define POLLIN 0x001
+ #define POLLPRI 0x002
+ #define POLLOUT 0x004
+ #define POLLERR 0x008
+#endif
+
using namespace std;
char own_hostname[512];
@@ -290,10 +299,13 @@ int main(int argc, char **argv )
res = sua_associate();
// register sua and its users
- sctp_registerUserCallback( fileno(stdin),
- &testip_stdin_cb,
- NULL
- );
+ res = sctp_registerUserCallback( fileno(stdin),
+ &testip_stdin_cb,
+ NULL,
+ POLLIN|POLLPRI
+ );
+
+ cout << "sctp_registerUserCallback result = "<< res << "\n";
init_testip_stdin();