#27 Search for nested serviceList (not stopping at the first lis


Internet Gateway Device description contains nested serviceList (rootdevice -> servicelist, subdevice
and subdevice has the lower-level serviceList, etc..)

Unfrotunately, the sample code sample_util.c used by tv_device sample, etc.
has a code that looks for only the first top-level serviceList.
This results in the failure to read all the services of an IGD xml description.

Attached patch modifies this behavior and looks for the service by
visiting all the serviceList in xml document in turn.

With the modified patch (ad additional modification), I could
simulate an IGD device and created a modified control program for that.

Patch against 1.6.6



  • zephyrus

    zephyrus - 2009-08-13

    sample_util.c to search for nested serviceList

  • Marcelo Roberto Jimenez

    • assigned_to: nobody --> mroberto
    • status: open --> open-postponed
  • Marcelo Roberto Jimenez


    Please, build your patches with "diff -u", otherwise I will not be able to apply it.

  • zephyrus

    zephyrus - 2010-03-16

    newly created patch (diff -u)

  • zephyrus

    zephyrus - 2010-03-16

    I uploaded a new patch using "diff -u".
    Between the original date when I posted the original patch and today,
    I have modified sample_util.c further to incorporate more verbose debug messages,
    some explicit lock/unlock of mutexes to shut up some analysis tools (valgrind, etc.).

    Hope this helps.

  • Marcelo Roberto Jimenez

    Hi zephyrus,

    In your patch you state:
    "modified heavily for IDG work by zephyrus00jp
    Copyright of the modified portion is by zephyrus00jp."

    It is not possible to distinguish your changes from the original changes once the patch is committed. I am afraid that in this form I cannot commit your patch.

  • zephyrus

    zephyrus - 2010-03-17

    Please disregard the first hunk in the patch.

    This copyright notice was necessitated since I wanted to release this modified version for
    a piece of software to support UPNP-like functionality for a reasonably powerful router with CLI
    function, but without UPNP (like the old-fashioned cisco router lying around in the storage room, etc.)
    In my case, it was a used NEC router with cisco IOS-like CLI interface.


    I thought that people would not touch a modified files, etc. unless they know who wrote it and
    under which conditions they are released, etc. That is why I put copyrightt notices
    in the files distributed in the above URL.

    In the case of this patch, I would like the patch to be part of the official libupnp release so that I don't have to
    distribute my own patch for myself. That would save extra efforts on the users, also. They don't have
    to patch the pristine source themselves.

    So please consider this post to mean that I am releasing this patch to be included
    in the official libupnp release (with suitable modification that you see fit) and
    that I concur that you can remove the following lines from the patch for incorporation.

    +// modified heavily for IDG work by zephyrus00jp
    +// Copyright of the modified portion is by zephyrus00jp.
    +// To contact zephyrus00jp, post a message to the open discussion forum at
    +// http://upnpproxy.sourceforge.net
    +// (Or as a last resort, try zephyrus00jp@gmail.com The e-mail is not
    +// monitored all the time. )

    Submitting patch is tricky, isn't it?
    Free Software Foundation (FSF) used to require the submitter of significant patch
    to sign copyright release form.

    Short of such formal papers, I hope this post should clarify my stance.
    (I hope this trail of posts clarifies any doubt in people's mind.)

    Once you release 1.6.7 (?) with the newer patches that stay dormant in the patch queue, I will
    reshuffle the code

    so that these extra comments will not be necessary, hopefully.

    Thank you again for your great piece of software, and I am glad you can work on
    the software again after a period of rest.


  • Marcelo Roberto Jimenez

    Ok, committed then. And ported to libUPnP 1.8.0.

    Thanks for your kind comments!

  • Marcelo Roberto Jimenez

    • status: open-postponed --> closed-accepted

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