New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quell some warnings #10023
Quell some warnings #10023
Conversation
cd633f2
to
fcb9ace
Compare
or @Paxxi ping Our depends/win32 all have MHD 0.9.50 so this is just for the distros that have a lower version correct? |
Well the old code is kept for that reason. it quells warnings which
|
mode = MHD_RESPMEM_MUST_COPY; | ||
else if (free) | ||
mode = MHD_RESPMEM_MUST_FREE; | ||
struct MHD_Response *response = MHD_create_response_from_buffer(0, nullptr, mode); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I'm not really up-to-date with the development of libmicrohttpd but the changes look ok. |
@@ -102,9 +102,25 @@ CWebServer::CWebServer() | |||
#endif | |||
} | |||
|
|||
static MHD_Response* create_response(size_t size, void* data, int free, int copy) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
good for merge imo unless @notspiff agrees about the enum and want to change it :) |
If you think investing work in the legacy code path is worth it.. it has been ints for years due to mhd api. Basically your comment is what was adressed upstream. |
fcb9ace
to
95e6892
Compare
early returns added. i will do the enumeration only if you insist. when we drop the legacy code path we can directly use the mhd enum so it feels kinda unnnecessary to put work into it. |
@notspiff not needed, as I mentioned in previous comment I left the decision to you as it's your time and a minor thing. |
FYI, this breaks at least the IOS Remote and in general the WebIF for me |
if you are going to FYI me, you better give me some information ;) |
yeah you are absolutely right, just made my wife happy in finding the PR that broke it. For now I just can say that IOS Remote cannot connect to kodi anymore. I'm running on non standard ports. I won't be able to make logs and dig into that deeper until in the evening. |
working fine with libmicrohttpd 0.9.37 on debian (default for jessie) and fails with 0.9.44 from stretch |
mode = MHD_RESPMEM_MUST_FREE; | ||
return MHD_create_response_from_buffer(0, nullptr, mode); | ||
#else | ||
return MHD_create_response_from_data(0, nullptr, free, copy); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Hi, just some additional detail on what is not working. iOS and Yatse remote control apps no longer work after this change (Ubuntu x86_64 16.04, LibreELEC #623 RPi and x86). Connecting to the webgui on port 8080 with a browser will result in "Connection to server lost" messages. The following JSON query will never return a result, it simply hangs - it should return the JSON schema more or less instantly:
iOS and Yatse applications can't create connections to clients because the webserver does not respond with the above query. Reverting this change restores functionality. I'll try a build with the change suggested by @popcornmix. |
webserver: fixup breakage in #10023
@Montellese for the last one i guess.