Subscribe timeout bug?

  • Oliver Newell

    Oliver Newell - 2004-10-05

    Hello -

    Looks to me like the subscription logic in
    upnp/event/ has a unit problem
    (seconds vs. millisec). Fix below.  I also added
    logic to handle the infinite duration timeout case.

    public boolean isExpired()
         long currTime = System.currentTimeMillis();

         if( timeOut == Subscription.INFINITE_VALUE )
           return false;

         long expiredTime = getSubscriptionTime() -getTimeOut()*1000;
         if (expiredTime < currTime)
             return true;                                                         
          return false;

    It also looks to me like in NMRP mode with
    auto-resubscribe enabled, the resubscribe process
    will always request (and get) an infinite timeout.
    I just hacked around it for now in my working copy
    of Clink - is there a way to specify the subscribe
    timeout in NMPR mode?


    • Oliver Newell

      Oliver Newell - 2004-10-05

      Whoops - that should have been:

      long expiredTime = getSubscriptionTime() + getTimeOut()*1000;

      I wish I could get my sourceforge message post window to be 80 columns!  Mine's only showing up as 60 columns, so all code snippets suffer from line wraparound and it makes me screw up... :)

      • Satoshi Konno

        Satoshi Konno - 2004-10-26

        Hi Oliver,

        I added your patches to my latest CyberLink for Java and C++ now.

        I am sorry that I couldn't reply soonner. I am very busy form last month because I have many projects on my business, but the two heavy projects have been almost finished this week.

        I have to write many programs for the last heavy project on my business, but I am adding many patches to the CyberLinks from this week.

        I will release the new package, please wait :-)

    • Oliver Newell

      Oliver Newell - 2004-10-26

      Hi Satoshi -

      No hurry - I can certainly relate to being busy!  I was just mentioning it since I thought it might help with that other user's subscription problem. 

    • obig

      obig - 2004-11-09

      I'm "that other user subscription problem" and I have tested the examples with your patch but there must be something else as their behaviour is the same. Thank you anyway


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks