Re: Regd ev_timer

2013-04-02 Thread Varun Chandramohan
Hi Jann, Sorry for psudo code and bad format. I put only the pseudo code because it will easier to see if there is a logical flaw. This is not to check for internet connectivity. In my actual code I use IP address not resolving. This is just test code so I have the same. Please excuse me. With t

Re: Regd ev_timer

2013-04-02 Thread Jann Horn
On Wed, Apr 03, 2013 at 09:27:31AM +1100, Varun Chandramohan wrote: > Hi Jann, > > Sorry for psudo code and bad format. I put only the pseudo code because it > will easier to see if there is a logical flaw. > > This is not to check for internet connectivity. In my actual code I use IP > address n

Re: Regd ev_timer

2013-04-02 Thread Varun Chandramohan
Hi Jann, Yeah, thanks for picking that up. Yes I will reset the timer. Just a question, so at line 78 if I removed if (events & EV_TIMEOUT) { } check will it be an issue. I dont see anything else calling this call back apart from this event. May be EV_ERROR perhaps? Also if you have time revert th

Re: Regd ev_timer

2013-04-02 Thread Jann Horn
On Wed, Apr 03, 2013 at 09:54:46AM +1100, Varun Chandramohan wrote: > Hi Jann, > > Yeah, thanks for picking that up. Yes I will reset the timer. Just a > question, so at line 78 if I removed if (events & EV_TIMEOUT) { } > check will it be an issue. I dont see anything else calling this call back >

Re: Regd ev_timer

2013-04-02 Thread Marc Lehmann
On Wed, Apr 03, 2013 at 09:54:46AM +1100, Varun Chandramohan wrote: > question, so at line 78 if I removed if (events & EV_TIMEOUT) { } > check will it be an issue. I dont see anything else calling this call back > apart from this event. May be EV_ERROR perhaps? The revents should only contain t

Re: Regd ev_timer

2013-04-02 Thread Varun Chandramohan
Thanks Marc, that seem clear. Would you be able to answer the question I asked Jann about the timer. I have pasted my code in previous post that can be compiled directly. It works now but if I just remove ev_now_update(loop) from both my handlers then the code goes bad and I get timeout events ev