Update of /cvsroot/playerstage/code/player/server/drivers/localization
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28430/localization

Modified Files:
        fakelocalize.cc 
Log Message:
fixed memory errors in fakelocalize


Index: fakelocalize.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/localization/fakelocalize.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** fakelocalize.cc     1 Nov 2007 22:16:19 -0000       1.16
--- fakelocalize.cc     23 Nov 2007 03:06:11 -0000      1.17
***************
*** 237,250 ****
      loc_data.pending_time = Reply->GetHeader()->timestamp;
      loc_data.hypoths_count = 1;
!     loc_data.hypoths = new player_localize_hypoth_t;
  
      loc_data.hypoths[0].mean = resp->pose;
  
      // zero covariance and max weight
!     memset(loc_data.hypoths[0].cov,0,sizeof(int64_t)*9);
!     loc_data.hypoths[0].alpha = htonl((uint32_t)1e6);
  
!     Publish(device_addr, PLAYER_MSGTYPE_DATA, 
PLAYER_LOCALIZE_DATA_HYPOTHS,&loc_data,sizeof(loc_data));
!     delete loc_data.hypoths;
      delete Reply;
      Reply = NULL;
--- 237,250 ----
      loc_data.pending_time = Reply->GetHeader()->timestamp;
      loc_data.hypoths_count = 1;
!     loc_data.hypoths = new player_localize_hypoth_t[1];
  
      loc_data.hypoths[0].mean = resp->pose;
  
      // zero covariance and max weight
!     memset(loc_data.hypoths[0].cov,0,sizeof(loc_data.hypoths[0].cov));
!     loc_data.hypoths[0].alpha = 1e6;
  
!     Publish(device_addr, PLAYER_MSGTYPE_DATA, 
PLAYER_LOCALIZE_DATA_HYPOTHS,&loc_data);
!     delete [] loc_data.hypoths;
      delete Reply;
      Reply = NULL;


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to