Fixes to make the agent work on win64.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10242 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
pandora-release 2014-06-20 11:16:42 +00:00
parent 15a192920f
commit 9ae742200d
7 changed files with 18 additions and 18 deletions

View File

@ -44,7 +44,7 @@ main (int argc, char *argv[]) {
Pandora_Windows_Service *service;
char buffer[PATH_SIZE];
string aux;
unsigned int pos;
int pos;
bool process = false;
string home;
string binary_path;

View File

@ -121,7 +121,7 @@ using namespace Pandora_Strutils;
string
parseLine (string line, string token) {
unsigned int pos;
int pos;
string retstr = "";
pos = line.find (token);
@ -506,7 +506,7 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
}
/* Subst macros */
unsigned int pos, pos_macro;
int pos, pos_macro;
string macro_name, macro_value;
if (macro_list.size () > 0) {

View File

@ -48,7 +48,7 @@ void
Pandora_Modules::Pandora_Module_List::parseModuleConf (string path_file, list<Pandora_Module *> *modules) {
ifstream file_conf (path_file.c_str ());
string buffer;
unsigned int pos;
int pos;
if (!file_conf.is_open ()) {
return;
@ -104,7 +104,7 @@ Pandora_Modules::Pandora_Module_List::parseModuleConf (string path_file, list<Pa
Pandora_Modules::Pandora_Module_List::Pandora_Module_List (string filename) {
ifstream file (filename.c_str ());
string buffer;
unsigned int pos;
int pos;
this->modules = new list<Pandora_Module *> ();
@ -123,7 +123,7 @@ Pandora_Modules::Pandora_Module_List::Pandora_Module_List (string filename) {
pos = buffer.find("include");
if (pos != string::npos){
string path_file;
unsigned pos_c;
int pos_c;
path_file = buffer.substr(pos+8);

View File

@ -46,7 +46,7 @@ string pandora_version = PANDORA_VERSION;
*/
void
Key_Value::parseLine (string str) {
unsigned int pos;
int pos;
list<string> tokens;
list<string>::iterator iter;
string trimmedstr;

View File

@ -60,7 +60,7 @@ void
Pandora::Pandora_Agent_Conf::parseFile(string path_file, Collection *aux){
ifstream file_conf (path_file.c_str ());
string buffer;
unsigned int pos;
int pos;
if (!file_conf.is_open ()) {
return;
@ -112,7 +112,7 @@ writeBrokerConf(string path_broker, string filename, string name_broker){
ofstream file_broker ((Pandora::getPandoraInstallDir ()+path_broker).c_str ());
string buffer;
string comp;
unsigned int pos;
int pos;
int i;
int ok;
@ -153,7 +153,7 @@ writeBrokerConf(string path_broker, string filename, string name_broker){
void
Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
string buffer, filename;
unsigned int pos;
int pos;
Collection *aux;
filename = Pandora::getPandoraInstallDir ();
@ -184,7 +184,7 @@ Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
pos = buffer.find("include");
if (pos != string::npos){
string path_file;
unsigned pos_c;
int pos_c;
path_file = buffer.substr(pos+8);
@ -200,7 +200,7 @@ Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
pos = buffer.find("broker_agent");
if (pos != string::npos){
string path_broker, name_broker;
unsigned pos_c;
int pos_c;
int position = 0;
name_broker = buffer.substr(pos+13);
@ -266,7 +266,7 @@ void
Pandora::Pandora_Agent_Conf::setFile (string filename) {
ifstream file (filename.c_str ());
string buffer;
unsigned int pos;
int pos;
Collection *aux;
if (this->key_values)
@ -292,7 +292,7 @@ Pandora::Pandora_Agent_Conf::setFile (string filename) {
pos = buffer.find("include");
if (pos != string::npos){
string path_file;
unsigned pos_c;
int pos_c;
path_file = buffer.substr(pos+8);

View File

@ -145,7 +145,7 @@ int
Pandora_Windows_Service::count_broker_agents(){
string buffer;
string filename;
unsigned int pos;
int pos;
int num = 0;
filename = Pandora::getPandoraInstallDir ();
@ -173,7 +173,7 @@ Pandora_Windows_Service::count_broker_agents(){
void
Pandora_Windows_Service::check_broker_agents(string *all_conf){
string buffer, filename;
unsigned int pos;
int pos;
int pos_file = 0;
filename = Pandora::getPandoraInstallDir ();
@ -374,7 +374,7 @@ Pandora_Windows_Service::getXmlHeader () {
string custom_id, url_address, latitude, longitude, altitude, position_description, gis_exec, gis_result;
time_t ctime;
struct tm *ctime_tm = NULL;
unsigned int pos;
int pos;
// Get agent name
agent_name = conf->getValue ("agent_name");
@ -1341,7 +1341,7 @@ string
Pandora_Windows_Service::checkAgentName(string filename){
string name_agent = "";
string buffer;
unsigned int pos;
int pos;
ifstream file (filename.c_str ());
while (!file.eof ()) {