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

Modified Files:
        readlog.cc 
Log Message:
added missing sub dir for mricp
patched readlog for unallocated mem error


Index: readlog.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/shell/readlog.cc,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** readlog.cc  1 Nov 2007 22:16:23 -0000       1.56
--- readlog.cc  24 Nov 2007 20:40:43 -0000      1.57
***************
*** 1456,1461 ****
                          int token_count, char **tokens, double time)
  {
!   int i, count;
! 
    switch(type)
    {
--- 1456,1461 ----
                          int token_count, char **tokens, double time)
  {
!   int i, count, ret;
!   ret = 0;
    switch(type)
    {
***************
*** 1482,1485 ****
--- 1482,1488 ----
              data.intensity_count = data.ranges_count;
  
+             data.ranges = new float[ data.ranges_count ];
+             data.intensity = new uint8_t[ data.ranges_count ];
+             
              count = 0;
              for (i = 13; i < token_count; i += 2)
***************
*** 1494,1502 ****
                PLAYER_ERROR2("range count mismatch at %s:%d",
                              this->filename, linenum);
!               return -1;
              }
!             this->Publish(id, type, subtype,
                            (void*)&data, sizeof(data), &time);
!             return(0);
            }
  
--- 1497,1511 ----
                PLAYER_ERROR2("range count mismatch at %s:%d",
                              this->filename, linenum);
!               ret = -1;
              }
!             else
!             {
!               this->Publish(id, type, subtype,
                            (void*)&data, sizeof(data), &time);
!             }
!             delete [] data.ranges;
!             delete [] data.intensity;
!             
!             return ret;
            }
  
***************
*** 1523,1526 ****
--- 1532,1538 ----
              data.scan.intensity_count = data.scan.ranges_count;
  
+             data.ranges = new float[ data.ranges_count ];
+             data.intensity = new uint8_t[ data.ranges_count ];
+             
              count = 0;
              for (i = 16; i < token_count; i += 2)
***************
*** 1535,1544 ****
                PLAYER_ERROR2("range count mismatch at %s:%d",
                              this->filename, linenum);
!               return -1;
              }
! 
!             this->Publish(id, type, subtype,
                            (void*)&data, sizeof(data), &time);
!             return(0);
            }
  
--- 1547,1560 ----
                PLAYER_ERROR2("range count mismatch at %s:%d",
                              this->filename, linenum);
!               ret = -1;
              }
!             else
!             {
!               this->Publish(id, type, subtype,
                            (void*)&data, sizeof(data), &time);
!               delete [] data.ranges;
!               delete [] data.intensity;
!             }
!             return ret;
            }
  


-------------------------------------------------------------------------
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