[Positioner] ReferencePoint: fix comments

Fixes/adds comments in delete_generated_requests().
This commit is contained in:
Matteo Cypriani 2012-05-29 13:42:25 +02:00
parent f54426c3bb
commit b8722b6a6c
1 changed files with 3 additions and 2 deletions

View File

@ -170,19 +170,20 @@ bool ReferencePoint::delete_generated_requests(void)
if ((*r)->get_mobile() == NULL)
goto delete_request ;
// Check if the request was sent by an AP
for (ap = Stock::get_aps().begin() ; ap != Stock::get_aps().end() ;
++ap)
if ((*r)->get_mobile()->get_mac_addr() ==
ap->second.get_mac_addr())
break ;
if (ap != Stock::get_aps().end()) // r still associated with an AP
if (ap != Stock::get_aps().end()) // r was sent by an AP
{
++r ;
continue ; // Do not delete r
}
// r is not assotiated with an AP, delete it
// r is not associated with an AP, delete it
delete_request:
Stock::delete_calibration_request(**r) ;
r = requests.erase(r) ;