#109 new callback genarated after UpnpUnRegisterClient()

open
upnp (66)
5
2012-12-14
2012-05-08
No

Description of UpnpUnRegisterClient() says
"The UPnP Library generates no more callbacks after this function returns".
But send_search_result() in ssdp_ctrlpt.c may generate one via function pointer determined at TPJobInit call.

Discussion

  • Yoichi NAKAYAMA

    Yoichi NAKAYAMA - 2012-05-08

    I found that callback is invoked AFTER HandleUnlock() in GenaAutoRenewSubscription(), gena_process_notification_event().
    I think there are possibilities to invoke callback after UpnpUnRegisterClient(), too:

    1. Thread-A stores callback pointer to local variable
    2. Thread-A releases lock
    3. Thread-B call UpnpUnRegisterClient() and it returns
    4. Thread-A invoke callback via local variable

    Invoke callback inside locked region will avoid the possibility, but I'm worry about that it may cause deadlocks depending on user supplied callback function.

    Any suggestions?

     
  • Marcelo Roberto Jimenez

    Hi Yiochi,

    Maybe calling the callback with HandleReadLock(), instead of HandleLock(), which is equivalent to HandleWriteLock()?

     

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

Sign up for the SourceForge newsletter:





No, thanks