[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error
From: |
Vitaliy T |
Subject: |
Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error |
Date: |
Wed, 15 Mar 2017 12:10:34 +0300 |
On 14 March 2017 at 23:21, Evgeny Grin <address@hidden> wrote:
> MHD_get_fdset() may return MHD_NO if epoll FD is too high to fit fd_set
> or if MHD_get_fdset() erroneously called for daemon with
> MHD_USE_THREAD_PER_CONNECTION option.
Sorry, you are wrong.
src/microhttpd/daemon.c
660 int
661 MHD_get_fdset (struct MHD_Daemon *daemon,
...
666 {
667 return MHD_get_fdset2 (daemon,
...
673 }
913 int
914 MHD_get_fdset2 (struct MHD_Daemon *daemon,
...
920 {
921 struct MHD_Connection *pos;
922 struct MHD_Connection *posn;
923 int result = MHD_YES;
924 MHD_socket ls;
925
926 if ( (NULL == daemon) ||
927 (NULL == read_fd_set) ||
928 (NULL == write_fd_set) ||
929 (daemon->shutdown) ||
930 (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) ||
931 (0 != (daemon->options & MHD_USE_POLL)))
932 return MHD_NO;
...
src/iinclude/microhttpd.h
882 enum MHD_FLAG
883 {
...
1038 MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY = MHD_USE_EPOLL |
MHD_USE_INTERNAL_POLLING_THREAD,
As you can see there is check against MHD_USE_POLL and if the flag is
set then MHD_get_fdset() is always return MND_NO.
--
With Best Regards,
Vitaliy V. Tokarev
- [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Vitaliy T, 2017/03/14
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Vitaliy T, 2017/03/14
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Evgeny Grin, 2017/03/14
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Vitaliy T, 2017/03/14
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Evgeny Grin, 2017/03/14
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Vitaliy T, 2017/03/15
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error,
Vitaliy T <=
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Evgeny Grin, 2017/03/15
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Vitaliy T, 2017/03/15
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Vitaliy T, 2017/03/15
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Evgeny Grin, 2017/03/15
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Vitaliy T, 2017/03/15
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Evgeny Grin, 2017/03/15
- Re: [libmicrohttpd] MHD_get_fdset throws "Illegal instruction" error, Vitaliy T, 2017/03/15