Changeset 13211 for trunk/FACT++
- Timestamp:
- 03/23/12 22:17:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/magicweather.cc
r13210 r13211 286 286 public: 287 287 ConnectionWeather(ba::io_service& ioservice, MessageImp &imp) : Connection(ioservice, imp()), 288 fIsVerbose(true), f KeepAlive(ioservice)288 fIsVerbose(true), fLastReport(Time::none), fLastReception(Time::none), fKeepAlive(ioservice) 289 289 { 290 290 SetLogStream(&imp); … … 309 309 int GetState() const 310 310 { 311 if (fLastReport +boost::posix_time::seconds(fInterval*2)>Time())311 if (fLastReport.IsValid() && fLastReport+boost::posix_time::seconds(fInterval*2)>Time()) 312 312 return 3; 313 if (fLastReception+boost::posix_time::seconds(fInterval*2)>Time()) 313 314 if (fLastReception.IsValid() && fLastReception+boost::posix_time::seconds(fInterval*2)>Time()) 314 315 return 2; 316 315 317 return 1; 316 318
Note:
See TracChangeset
for help on using the changeset viewer.