Looks to me like the subscription logic in
upnp/event/Subscriber.java 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 )
long expiredTime = getSubscriptionTime() -getTimeOut()*1000;
if (expiredTime < currTime)
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?
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... :)
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 :-)
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.
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