projects
/
NextIRCd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
233e55c
)
added additional iohandler_poll_timeout function
author
pk910
<philipp@zoelle1.de>
Mon, 24 Sep 2012 14:40:24 +0000
(16:40 +0200)
committer
pk910
<philipp@zoelle1.de>
Mon, 24 Sep 2012 14:40:24 +0000
(16:40 +0200)
src/IOHandler.c
patch
|
blob
|
history
src/IOHandler.h
patch
|
blob
|
history
diff --git
a/src/IOHandler.c
b/src/IOHandler.c
index 81d8d0982fd70c9d8db824427baed4acf7fba361..db9a5998d2f5dc486ad39fa69eb0d050d50cfca0 100644
(file)
--- a/
src/IOHandler.c
+++ b/
src/IOHandler.c
@@
-706,11
+706,15
@@
void iohandler_events(struct IODescriptor *iofd, int readable, int writeable) {
}
void iohandler_poll() {
+ struct timeval timeout;
+ timeout.tv_sec = IO_MAX_TIMEOUT;
+ timeout.tv_usec = 0;
+ iohandler_poll_timeout(timeout);
+}
+
+void iohandler_poll_timeout(struct timeval timeout) {
if(engine) {
IOSYNCHRONIZE(io_poll_sync); //quite senceless multithread support... better support will follow
- struct timeval timeout;
- timeout.tv_sec = IO_MAX_TIMEOUT;
- timeout.tv_usec = 0;
engine->loop(&timeout);
IODESYNCHRONIZE(io_poll_sync);
}
diff --git
a/src/IOHandler.h
b/src/IOHandler.h
index 208b854b79e52567b22c786a6806eaca922098b4..b0a6c6bc50c9e0e54c0981e45c25a4fb153a7bae 100644
(file)
--- a/
src/IOHandler.h
+++ b/
src/IOHandler.h
@@
-117,5
+117,6
@@
void iohandler_update(struct IODescriptor *iofd);
void iohandler_set_timeout(struct IODescriptor *iofd, struct timeval *timeout);
void iohandler_poll();
+void iohandler_poll_timeout(struct timeval timeout);
#endif