[mythtv] Mythweather not download weather radar map.

Christian Hack christianh at pdd.edmi.com.au
Sat May 24 17:09:13 EDT 2003


Thanks for the quick fix.

While you're there John, I have another question I was going to ask but
forgot - although it maybe more due to the fact I don't completely
understand how all the comms works.

In mythweathercomms.cpp you have the code chunk below. The way I read it you
do your timeouts by going to sleep for 50 _micro_ seconds at time. Thus if
your aggressiveness setting is even 15, the most it will wait is 15x50x5 us
= 3.75ms. i.e. not much of a timeout. I haven't bothered with the x10 and
x15 since I haven't looked at what getIntStatus is doing, but they won't
increase the timeout to very much.

If the aggressiveness setting is to truly be in seconds, then usleep should
be 200000us. Correct?

Without it, my system (only 56k dialup though) times out 10 times real
quickly and then simply gives up.

Code snippet follows:

while (breakout == false)
{
  if (tmpState != curState)
  {
   if (debug == true)
    cout << "MythWeather: COMMS : State Transition : " << strStatus() <<
endl;
   curState = httpSock->state();
   timeout_cnt = 0;
  }
  parent->processEvents();
  usleep(50);

  tmpState = httpSock->state();
  timeout_cnt++;

  if (timeout_cnt > (int)(5*aggressiveness) && getIntStatus() == 1)
   resetConnection();

  if (timeout_cnt > (int)(10*aggressiveness) && getIntStatus() == 2)
   resetConnection();

  if (timeout_cnt > (int)(15*multiplyer*aggressiveness) && getIntStatus() ==
3)
   resetConnection();

    ...
}

----- Original Message -----
From: "John Danner" <johndanner at untzuntz.com>
To: "Development of mythtv" <mythtv-dev at snowman.net>
Sent: Saturday, May 24, 2003 3:38 PM
Subject: Re: [mythtv] Mythweather not download weather radar map.


> Should be fixed in cvs...thanks.
>
> -John
>
>
> ---------- Original Message -----------
> From: "Christian Hack" <christianh at pdd.edmi.com.au>
> To: <mythtv-dev at snowman.net>
> Sent: Sat, 24 May 2003 14:33:45 +1000
> Subject: [mythtv] Mythweather not download weather radar map.
>
> > Having some mythweather problems with CVS checked out today,
> > although I doubt that makes much difference.
> >
> > When it comes to the second download stage to parse for the URL of
> > the satellite image, it gets a redirect but doesn't seem to handle
> > it correctly. It then can't fint the map since it doesn't get the
> > correct file...
> >
> > Basically in my case (Brisbane Australia ASXX0016) it downloads the URL:
> > http://www.weather.com/weather/map/ASXX0016?from=LAPmaps
> >
> > but instead gets:
> > <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> > <HTML><HEAD>
> > <TITLE>301 Moved Permanently</TITLE>
> > </HEAD><BODY>
> > <H1>Moved Permanently</H1>
> > The document has moved <A
> >
HREF="http://www.weather.com/common/setrmidcookie.html?/weather/map/ASXX0016
> > ?from=LAPmaps">here</A>.<P>
> > <HR>
> > <ADDRESS>Apache/1.3.27 Server at www.weather.com Port 80</ADDRESS>
> > </BODY></HTML>
> >
> > IE, Mozilla etc handles both the URL and the redirect correctly.
> >
> > Are other people getting this? I'm in Australia but I'd say it's the
> > same everywhere else. Was mythweather written when this redirect was
> > occuring or is it a new thing?
> >
> > Christian
> >
> > _______________________________________________
> > mythtv-dev mailing list
> > mythtv-dev at snowman.net
> > http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev
> ------- End of Original Message -------
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list