PUPnP threads on embedded devices.

  • Charles Nepveu

    Charles Nepveu - 2008-04-14

    Hello, I'm using PUPnP on an embedded device configured with --disable-webserver

    However, in UpnpInit(), a thread pool is allocated for the miniserver without considering the macro INTERNAL_WEB_SERVER.
    The pthreads implementation (uClibc) on my device uses 'fork' to spawn new threads. Given the fact that the device memory is small, special care taken to keep the running process efficient on memory, and threads as few as possible.

    I therefore suggest:

    in UpnpInit():
        if( ThreadPoolInit( &gMiniServerThreadPool, &attr ) != UPNP_E_SUCCESS ) {
            UpnpSdkInit = 0;
            return UPNP_E_INIT_FAILED;

    And the same thing for UpnpFinish()'s references to 'gMiniServerThreadPool'.

    • Marcelo Roberto Jimenez

      Hi Charles,

      I have just committed your suggestion. Please test and report if all is ok.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks