Commit Graph

105 Commits

Author SHA1 Message Date
Willem Toorop 439f41149b Last rename + explicit EMFILE check replacement 2017-11-03 16:42:38 +01:00
Willem Toorop 4508ec77fb Few more renames 2017-11-03 16:26:19 +01:00
Willem Toorop a8fac29a66 Handle more harmless I/O error cases +
- never exit on I/O errors
- never stop listening on I/O errors
- extended platfrom.[ch] with _getdns_strerror()
2017-11-03 13:50:13 +01:00
Willem Toorop 09b4f6d57d One more _getdns_perror 2017-10-31 16:22:09 +01:00
Jim Hague 4ca8ee008b Add _getdns_perror(). On Windows this reports Winsock errors. 2017-10-06 18:15:18 +01:00
Jim Hague eb6da94e25 Convert one more poll() to _getdns_poll(). 2017-10-06 12:07:47 +01:00
Jim Hague dc7daede40 Move Windows/Unix functions into new platform.h. 2017-10-06 12:07:15 +01:00
Jim Hague a0c313412d Adjust Unix socket/Winsock handling.
Centralise it into util-internal.h, remove duplicate definitions from mdns, and add new pseudo-functions _getdns_closesocket(), _getdns_poll() and _getdns_socketerror(). Convert error values to simple values and convert error checking to use _getdns_socketerror() and the simple values. The simple values can also be used with the result from getsockopt() with SO_ERROR in stub.c.
2017-10-04 17:31:33 +01:00
Willem Toorop 712f62a4c1 Things that came out of compiling on Windows 2017-09-21 11:03:38 +02:00
Willem Toorop 7c229c40cd Merge branch 'features/zeroconf-dnssec' into release/v1.2.0 2017-09-20 15:45:27 +02:00
Willem Toorop aa74c0a3d5 One more pleasing travis fix 2017-09-14 16:43:10 +02:00
Willem Toorop 836c651539 Initial fixes from John to compile getdns on Windows 2017-09-14 12:25:25 +02:00
Willem Toorop 44065bead8 Initial windows work 2017-07-06 00:26:21 +02:00
Willem Toorop 7151e6fd44 Deal with leaking timeouts (between sync and async loop) 2017-07-01 01:01:17 +02:00
Willem Toorop ce43942cbe Respond to socket errors 2017-06-26 16:57:23 +02:00
huitema 6f0b08a400 Fixing the select event loop so it does not give up for naked timers in Windows.
Making sure the poll event loop works on windows.
Fixing the poll event loop so it does not give up for naked timers in Windows.
2017-03-26 10:07:44 -05:00
Willem Toorop a453678094 Debug the call to poll 2017-02-18 10:07:04 +01:00
Willem Toorop 990800d9f9 Bugfix poll_eventloop initialization error 2017-02-17 13:16:06 +01:00
Willem Toorop a6859a08d3 Remove getrlimit from poll_eventloop
No use to check for this limit, because the filedescriptor is already open.
2017-02-16 22:48:16 +01:00
Willem Toorop d20bbde25e Fixed time allocation and free for fd_events 2017-02-16 22:41:37 +01:00
Willem Toorop f6d46689b6 Fixed time allocation and free for to_events 2017-02-16 16:26:41 +01:00
Willem Toorop 2d35993c83 Timeout events in array 2017-02-16 15:22:57 +01:00
Willem Toorop e4eddca259 Reference event_info directly 2017-02-15 15:10:11 +01:00
Willem Toorop 7b6b0ff642 No helper copy variables 2017-02-15 14:57:30 +01:00
Willem Toorop b2fe9673de Fix realloc pfds set error + callback order error 2017-02-15 13:08:47 +01:00
Willem Toorop b7c2e53a82 Off by one problem? 2017-02-15 12:21:29 +01:00
Willem Toorop 3e8822e0e2 Fix uninitialized data error in valgrind check 2017-02-15 11:43:07 +01:00
Willem Toorop c936f0c51d Other allocs and frees with custom mem funcs too 2017-02-15 10:56:19 +01:00
Willem Toorop 7484b8c37b Initialize default eventloop with custom mem funcs 2017-02-15 10:22:41 +01:00
Willem Toorop 549de0de60 Use of custom mem funcs by uthash 2017-02-14 13:41:58 +01:00
Willem Toorop 60443fb7fd Choice of poll or select based default event loop 2017-02-13 11:56:25 +01:00
Neil Cook dad4aaf6d8 correctly allocate and free memory for eventloop hashes 2017-01-18 15:31:01 +00:00
Neil Cook fd3e0c01f7 call default_time_cb with -1 instead of index 2017-01-18 15:12:56 +00:00
Willem Toorop 17da80a828 Feed poll with millisecond timeout 2017-01-18 14:29:32 +01:00
Neil Cook 7ebf3924b5 Copy event pointer out of event hash table before callbacks, because it might be deleted 2016-12-16 10:36:21 +00:00
Neil Cook 5e26137eda Fix default_eventloop_run OR instead of AND and hash table iteration safety 2016-12-15 13:40:40 +00:00
Willem Toorop 9b715d4743 Suppress compile warnings 2016-12-15 09:53:49 +01:00
Willem Toorop da527358c0 Merge branch 'develop' into devel/fixed_eventloop 2016-12-15 09:45:16 +01:00
Neil Cook 0d39563978 Consisten use of TIMEOUT_FOREVER 2016-12-14 17:50:39 +00:00
Neil Cook c1d5ae9a25 set event id in add_event rather than calling function 2016-12-14 17:04:09 +00:00
Neil Cook e9e6ff013b Fix travis compiler warnings/errors 2016-12-14 16:49:24 +00:00
Neil Cook 326b6bb410 remove redundant debugging 2016-12-14 16:10:44 +00:00
Neil Cook 5cc4028d63 cleanup poll.h include for non-windows 2016-12-14 15:54:10 +00:00
Neil Cook d3b097fffe Rewrite default_eventloop to use hash tables instead of arrays 2016-12-14 15:52:44 +00:00
Neil Cook a9386e621a max_fds and max_timeouts part of default eventloop structure 2016-12-14 15:50:55 +00:00
Neil Cook 8b4c90eaf4 move default eventloop from select to poll, make max fds dependent on value from getrlimit not FD_SETSIZE 2016-12-14 15:50:55 +00:00
Willem Toorop 5f6b93f7f2 Use __func__ var when supported
And let debugging messages compile with -Wpedantic -Werror too
2016-12-12 13:55:10 +01:00
Willem Toorop 4345905a81 Address things that came out of VS static analysis
Except for the stack usage cases
2016-12-09 12:57:47 +01:00
Willem Toorop 5cc67ff554 Merge branch 'develop' into merge-develops 2016-12-09 12:05:42 +01:00
Willem Toorop 39f854d2b3 Fixes for pedantic warnings 2016-12-08 16:27:43 +01:00