GithubHelp home page GithubHelp logo

rboulton / libmicrohttpd Goto Github PK

View Code? Open in Web Editor NEW
65.0 9.0 27.0 2.84 MB

Mirror from SVN of GNU libmicrohttpd

Home Page: http://www.gnu.org/software/libmicrohttpd/

License: Other

C 99.94% Shell 0.06%

libmicrohttpd's Issues

An improper locking due to the unreleased lock before program exit

Hi developers, in the below codes, the lock daemon could be not released before program's exit abort();. I think it is better to write MHD_ip_count_unlock (daemon); before the abort(); for better resource management and code symmetry. Thanks!

MHD_ip_count_lock (daemon);
/* Search for the IP address */
node = (void*)TFIND (&search_key, &daemon->per_ip_connection_count, MHD_ip_addr_compare);
/* Something's wrong if we couldn't find an IP address
* that was previously added */
if (!node)
{
#if HAVE_MESSAGES
MHD_DLOG (daemon,
"Failed to find previously-added IP address\n");
#endif
abort();
}
found_key = (struct MHD_IPCount*)*(void**)node;
/* Validate existing count for IP address */
if (found_key->count == 0)
{
#if HAVE_MESSAGES
MHD_DLOG (daemon,
"Previously-added IP address had 0 count\n");
#endif
abort();
}
/* Remove the node entirely if count reduces to 0 */
if (--found_key->count == 0)
{
TDELETE (found_key, &daemon->per_ip_connection_count, MHD_ip_addr_compare);
free (found_key);
}
MHD_ip_count_unlock (daemon);

libmicrohttpd MHD_start_daemon Illegal instruction: 4

I have an application programmed in c++ which works fine. However some customer who use it on mac crash it. After some research, turns out the problem come from the libmicrohttpd when MHD_start_daemon is launched.

it returns an error : Illegal instruction: 4
Ps : I can not reproduce the problem it works fine for me....

Post Data

Hi, can I get the GET data ?:

url?key=test&data=value

static link with libmicrohttpd issue

Hi Richard,

I am trying to compile and static link with libmicrohttpd. with the following command, I am getting "undefined reference to" error, If I compile without -static flag, it works perfectly. did I do anything wrong? the test.c is just a copy of one of example, I add #include stdlib.h, stdio and string.h.

gcc -static -DHAVE_CONFIG_H -ggdb -std=gnu99 -o test -I/opt/bigdatalab/usrlib/libmicrohttpd/include/ -L /opt/bigdatalab/usrlib/libmicrohttpd/lib -lmicrohttpd test.c -lrt

/tmp/ccaFAFRr.o: In function answer_to_connection': test.c:27: undefined reference toMHD_lookup_connection_value'
test.c:31: undefined reference to MHD_create_response_from_buffer' test.c:39: undefined reference toMHD_queue_response'
test.c:41: undefined reference to MHD_queue_response' test.c:43: undefined reference toMHD_destroy_response'
/tmp/ccaFAFRr.o: In function main': test.c:62: undefined reference toMHD_start_daemon'
test.c:69: undefined reference to `MHD_stop_daemon'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.