Update of /cvsroot/playerstage/code/player/server/drivers/laser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31117/laser
Modified Files:
sicklms200.cc
Log Message:
possible fix for laser memory errors
Index: sicklms200.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/laser/sicklms200.cc,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** sicklms200.cc 1 Nov 2007 22:16:19 -0000 1.65
--- sicklms200.cc 13 Nov 2007 20:04:13 -0000 1.66
***************
*** 294,297 ****
--- 294,298 ----
int scan_id;
+ player_laser_data_t data;
#ifdef HAVE_HI_SPEED_SERIAL
***************
*** 502,507 ****
this->scan_id = 0;
PLAYER_MSG0(2, "laser ready");
- //memset(data, 0, sizeof(data));
// Start the device thread
--- 503,508 ----
this->scan_id = 0;
+ memset(&data,0,sizeof(data));
PLAYER_MSG0(2, "laser ready");
// Start the device thread
***************
*** 525,530 ****
CloseTerm();
! //delete [] data.ranges;
! //delete [] data.intensity;
PLAYER_MSG0(2, "laser shutdown");
--- 526,532 ----
CloseTerm();
!
! laser_data_t_cleanup(&data);
!
PLAYER_MSG0(2, "laser shutdown");
***************
*** 665,669 ****
if (ReadLaserData(mm_ranges, 1024) == 0)
{
- player_laser_data_t data;
if (first)
{
--- 667,670 ----
***************
*** 731,737 ****
this->Publish(this->device_addr,
PLAYER_MSGTYPE_DATA, PLAYER_LASER_DATA_SCAN,
! (void*)&data, sizeof(data), &time);
! delete [] data.ranges;
! delete [] data.intensity;
}
}
--- 732,736 ----
this->Publish(this->device_addr,
PLAYER_MSGTYPE_DATA, PLAYER_LASER_DATA_SCAN,
! (void*)&data, 0, &time);
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit