Update of /cvsroot/playerstage/code/player/server/drivers/localization
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11860/server/drivers/localization
Modified Files:
Tag: b_thjc_dynamic_arrays
fakelocalize.cc .cvsignore
Log Message:
dynamic array changes to drivers compile, still needs testing
added lots more .cvsignore settings for eclipse
Index: .cvsignore
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/localization/.cvsignore,v
retrieving revision 1.1.20.1
retrieving revision 1.1.20.2
diff -C2 -d -r1.1.20.1 -r1.1.20.2
*** .cvsignore 10 Oct 2007 09:26:10 -0000 1.1.20.1
--- .cvsignore 19 Oct 2007 21:59:00 -0000 1.1.20.2
***************
*** 4,5 ****
--- 4,7 ----
*.la
*.a
+ .libs
+ *.lo
Index: fakelocalize.cc
===================================================================
RCS file:
/cvsroot/playerstage/code/player/server/drivers/localization/fakelocalize.cc,v
retrieving revision 1.11.2.2
retrieving revision 1.11.2.3
diff -C2 -d -r1.11.2.2 -r1.11.2.3
*** fakelocalize.cc 14 Oct 2007 04:41:46 -0000 1.11.2.2
--- fakelocalize.cc 19 Oct 2007 21:59:00 -0000 1.11.2.3
***************
*** 105,108 ****
--- 105,109 ----
// Constructor
public: FakeLocalize( ConfigFile* cf, int section);
+ ~FakeLocalize();
// Setup/shutdown/run routines.
***************
*** 120,124 ****
private: player_devaddr_t sim_id;
private: player_devaddr_t localize_addr;
! private: const char* model;
};
--- 121,125 ----
private: player_devaddr_t sim_id;
private: player_devaddr_t localize_addr;
! private: char* model;
};
***************
*** 165,169 ****
! if(!(this->model = cf->ReadString(section, "model", NULL)))
{
PLAYER_ERROR("must specify non-NULL model name");
--- 166,170 ----
! if(!(this->model = strdup(cf->ReadString(section, "model", NULL))))
{
PLAYER_ERROR("must specify non-NULL model name");
***************
*** 171,184 ****
return;
}
- if(strlen(this->model) >= PLAYER_SIMULATION_IDENTIFIER_MAXLEN)
- {
- PLAYER_ERROR("model name is too long");
- this->SetError(-1);
- return;
- }
return;
}
////////////////////////////////////////////////////////////////////////////////
--- 172,183 ----
return;
}
return;
}
+ FakeLocalize::~FakeLocalize()
+ {
+ free (this->model);
+ }
////////////////////////////////////////////////////////////////////////////////
***************
*** 234,240 ****
// Request pose
! strncpy(cfg.name, this->model, PLAYER_SIMULATION_IDENTIFIER_MAXLEN);
! cfg.name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN - 1] = '\0';
! cfg.name_count =
min(strlen(cfg.name),PLAYER_SIMULATION_IDENTIFIER_MAXLEN-1) + 1;
Message * Reply = sim->Request(InQueue, PLAYER_MSGTYPE_REQ,
PLAYER_SIMULATION_REQ_GET_POSE2D,
--- 233,238 ----
// Request pose
! cfg.name = this->model;
! cfg.name_count = strlen(cfg.name);
Message * Reply = sim->Request(InQueue, PLAYER_MSGTYPE_REQ,
PLAYER_SIMULATION_REQ_GET_POSE2D,
***************
*** 244,248 ****
{
// we got a good reply so update our data
! assert(Reply->GetDataSize() == sizeof(cfg));
player_simulation_pose2d_req_t * resp =
reinterpret_cast<player_simulation_pose2d_req_t *> (Reply->GetPayload());
--- 242,246 ----
{
// we got a good reply so update our data
! assert(Reply->GetDataSize() > 0);
player_simulation_pose2d_req_t * resp =
reinterpret_cast<player_simulation_pose2d_req_t *> (Reply->GetPayload());
***************
*** 337,343 ****
// Request pose
! strncpy(cfg.name, this->model, PLAYER_SIMULATION_IDENTIFIER_MAXLEN);
! cfg.name[PLAYER_SIMULATION_IDENTIFIER_MAXLEN - 1] = '\0';
! cfg.name_count =
min(strlen(cfg.name),PLAYER_SIMULATION_IDENTIFIER_MAXLEN-1) + 1;
Message * Reply = sim->Request(InQueue, PLAYER_MSGTYPE_REQ,
PLAYER_SIMULATION_REQ_GET_POSE2D,
--- 335,340 ----
// Request pose
! cfg.name = this->model;
! cfg.name_count = strlen(cfg.name);
Message * Reply = sim->Request(InQueue, PLAYER_MSGTYPE_REQ,
PLAYER_SIMULATION_REQ_GET_POSE2D,
-------------------------------------------------------------------------
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