Re: [libmicrohttpd] socket_context not set (libmicrohttpd-0.9.50)
Christian, > Eh, what is that "*" doing in the "if" line? reason is that in definition of the MHD_ConnectionInfo union, I see socket_context defined as "void**", maybe it should be just "void*" > Also, what code do you use in the connection notification callback to set the socket_contest? MyContext *contextPtr = new MyContext(); *socket_context = contextPtr;
Re: [libmicrohttpd] socket_context not set (libmicrohttpd-0.9.50)
On 06/05/2017 06:01 PM, Miguel Sancho wrote: > Christian, > >> Eh, what is that "*" doing in the "if" line? > > reason is that in definition of the MHD_ConnectionInfo union, I see > socket_context defined as "void**", maybe it should be just "void*" It is indeed "void *" in more recent versions of MHD. >> Also, what code do you use in the connection notification callback to > set the socket_contest? > > MyContext *contextPtr = new MyContext(); > *socket_context = contextPtr; Ok, that looks correct. signature.asc Description: OpenPGP digital signature
Re: [libmicrohttpd] socket_context not set (libmicrohttpd-0.9.50)
ok, I understand now, thanks!
[libmicrohttpd] [GSoC Update] Week 1
= SUMMARY == My public fork of Wget2 project is available here [1]. I will continuously keep pushing my work so anyone interested can track me there. Feel free to participate in the discussions going on merge request with my mentors. Your feedback are highly appreciated. === INTRODUCTION === The purpose of this project is to use Libmicrohttpd as test suite for Wget2. I plan to do this by do some changes on function wget_test_start_server() also wget_test_stop_server() on src/libtest.c of Wget2. With this approach, I don't need to change existing test suite which call the internal server code through functions mentioned above. I've count there are 36 test file which use wget_test_start_server(). I must ensure all the test passed. And for installation prerequisite, I must ensure that Libmicrohttpd are included when building Wget2 binary. Then I need to modify configure.ac. I will give proper warning about this requirement. There is a section in README.md where I must explain to user to provide Libmicrohttpd to make all test running correctly. With Libmicrohttpd I can add new test using feature that not yet implemented in old server code, but ready on Libmicrohttpd, such as HTTP authentication [2] and concurrent request checking. Mentors: Darshit Shah Ander Juaristi == UPDATES = Things which were done in this week: * I have finished modify configure.ac to include Libmicrohttpd into Wget2. I keep my work in this branch [3] of my repository. * I have ensured that all make check passed on several testing machine including: Debian/GCC, Fedora/Clang, MingW64 [4] and OSX [5]. Especially for MingW64 build, because I haven't found the correct package for Libmicrohttpd, I include Libmicrohttpd by downloading the source and compile manually. See [6]. Any better idea will be reconsidered and appreciated. * With Libmicrohttpd becomes mandatory package to install before building Wget2 binary, there must be proper warning about this requirement, otherwise the building process will fail. I have add oneliner information into README.md. Please notice me if there are some other places where I can add warning like this. = NEXT STEPS === Things which would be done in the coming week: * Finished on wget_test_start_server() in order to call Libmicrohttpd as service for wget_test(). [1]: https://gitlab.com/dstw/wget2 [2]: https://www.gnu.org/software/libmicrohttpd/manual/libmicrohttpd.html#microhttpd_002ddauth [3]: https://gitlab.com/dstw/wget2/tree/use-mhd [4]: https://gitlab.com/dstw/wget2/builds/ [5]: https://travis-ci.org/dstw/wget2/jobs/239096327 [6]: https://gitlab.com/dstw/wget2/builds/17826461 Regards, Didik Setiawan
Re: [libmicrohttpd] [GSoC Update] Week 1
Maybe I missed something, but why should the MHD dependency become _mandatory_? Why not conditionally-compile and run the tests only if MHD is present? MHD does the same for libcurl. Making the dependency optional also avoids the obvious possibility of circular dependencies if we ever were to add libwget2-based tests to MHD :-). On 06/05/2017 06:46 PM, Didik Setiawan wrote: > * With Libmicrohttpd becomes mandatory package to install before building > Wget2 >binary, there must be proper warning about this requirement, otherwise the >building process will fail. I have add oneliner information into README.md. >Please notice me if there are some other places where I can add warning > like >this. signature.asc Description: OpenPGP digital signature
Re: [libmicrohttpd] [GSoC Update] Week 1
On Mon, 05 Jun 2017 23:51:00 +0700 Christian Grothoff wrote: > Maybe I missed something, but why should the MHD dependency become > _mandatory_? Why not conditionally-compile and run the tests only if MHD > is present? Maybe I just misinterpreting this [1]? What Darshit said about removing old server code from the codebase will make Wget2 more stable since we will not be susceptible to bugs in the HTTP Server code. So, if it is better options, I will amend my current change, make MHD optional, give fallback to the old server code if MHD not available. > MHD does the same for libcurl. Making the dependency optional also avoids the > obvious possibility of circular dependencies if we ever were to add > libwget2-based tests to MHD :-). That's our goal too. Make libwget as alternative for libcurl. [1] https://github.com/rockdaboot/wget2/issues/128
Re: [libmicrohttpd] [GSoC Update] Week 1
Hi Didik, thanks for the summary of week #1 ! On Dienstag, 6. Juni 2017 00:40:56 CEST Didik Setiawan wrote: > On Mon, 05 Jun 2017 23:51:00 +0700 Christian Grothoff wrote: > > Maybe I missed something, but why should the MHD dependency become > > _mandatory_? Why not conditionally-compile and run the tests only if MHD > > is present? > > Maybe I just misinterpreting this [1]? What Darshit said about removing old > server code from the codebase will make Wget2 more stable since we will not > be susceptible to bugs in the HTTP Server code. > So, if it is better options, I will amend my current change, make MHD > optional, give fallback to the old server code if MHD not available. I guess Christian meant to skip the appropriate tests if MHD is not installed/ available. We should definitely get rid of our server code in libwget and focus on client functionality. Kick it out once MHD code works :-) But of course we want to run as many tests as possible with MinGW as well... maybe you provide a script (e.g. in contrib/) that downloads/builds/installs MHD. Add that script to our CI runner YAML file(s) and we can test on MinGW as well. Let me know which packages you need for the docker images. > > MHD does the same for libcurl. Making the dependency optional also avoids > > the obvious possibility of circular dependencies if we ever were to add > > libwget2-based tests to MHD :-). > > That's our goal too. Make libwget as alternative for libcurl. > > [1] https://github.com/rockdaboot/wget2/issues/128 With Best Regards, Tim signature.asc Description: This is a digitally signed message part.
Re: [libmicrohttpd] [GSoC Update] Week 1
On Tue, 06 Jun 2017 02:37:54 +0700 Tim Rühsen wrote: > I guess Christian meant to skip the appropriate tests if MHD is not > installed/ > available. We should definitely get rid of our server code in libwget and > focus on client functionality. Kick it out once MHD code works :-) Understood. > But of course we want to run as many tests as possible with MinGW as well... > maybe you provide a script (e.g. in contrib/) that downloads/builds/installs > MHD. Add that script to our CI runner YAML file(s) and we can test on MinGW > as > well. Let me know which packages you need for the docker images. What I've done so far with .gitlab-ci.yml is add the following lines: MinGW64: + before_script: + - dnf -y install wget + - wget http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.55.tar.gz + - tar zxf libmicrohttpd-0.9.55.tar.gz && cd libmicrohttpd-0.9.55/ + - mingw64-configure --prefix=/usr/x86_64-w64-mingw32/sys-root/mingw/ + - mingw64-make -j$(nproc) + - mingw64-make -j$(nproc) LOG_COMPILER=wine install + - cd - Should I move it to contrib/, or anything else? Because there is no such thing like mingw-libmicrohttpd available on the docker images. Regards, Didik Setiawan