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:
parent
15a192920f
commit
9ae742200d
Binary file not shown.
|
@ -44,7 +44,7 @@ main (int argc, char *argv[]) {
|
||||||
Pandora_Windows_Service *service;
|
Pandora_Windows_Service *service;
|
||||||
char buffer[PATH_SIZE];
|
char buffer[PATH_SIZE];
|
||||||
string aux;
|
string aux;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
bool process = false;
|
bool process = false;
|
||||||
string home;
|
string home;
|
||||||
string binary_path;
|
string binary_path;
|
||||||
|
|
|
@ -121,7 +121,7 @@ using namespace Pandora_Strutils;
|
||||||
|
|
||||||
string
|
string
|
||||||
parseLine (string line, string token) {
|
parseLine (string line, string token) {
|
||||||
unsigned int pos;
|
int pos;
|
||||||
string retstr = "";
|
string retstr = "";
|
||||||
|
|
||||||
pos = line.find (token);
|
pos = line.find (token);
|
||||||
|
@ -506,7 +506,7 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Subst macros */
|
/* Subst macros */
|
||||||
unsigned int pos, pos_macro;
|
int pos, pos_macro;
|
||||||
string macro_name, macro_value;
|
string macro_name, macro_value;
|
||||||
|
|
||||||
if (macro_list.size () > 0) {
|
if (macro_list.size () > 0) {
|
||||||
|
|
|
@ -48,7 +48,7 @@ void
|
||||||
Pandora_Modules::Pandora_Module_List::parseModuleConf (string path_file, list<Pandora_Module *> *modules) {
|
Pandora_Modules::Pandora_Module_List::parseModuleConf (string path_file, list<Pandora_Module *> *modules) {
|
||||||
ifstream file_conf (path_file.c_str ());
|
ifstream file_conf (path_file.c_str ());
|
||||||
string buffer;
|
string buffer;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
|
|
||||||
if (!file_conf.is_open ()) {
|
if (!file_conf.is_open ()) {
|
||||||
return;
|
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) {
|
Pandora_Modules::Pandora_Module_List::Pandora_Module_List (string filename) {
|
||||||
ifstream file (filename.c_str ());
|
ifstream file (filename.c_str ());
|
||||||
string buffer;
|
string buffer;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
|
|
||||||
this->modules = new list<Pandora_Module *> ();
|
this->modules = new list<Pandora_Module *> ();
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ Pandora_Modules::Pandora_Module_List::Pandora_Module_List (string filename) {
|
||||||
pos = buffer.find("include");
|
pos = buffer.find("include");
|
||||||
if (pos != string::npos){
|
if (pos != string::npos){
|
||||||
string path_file;
|
string path_file;
|
||||||
unsigned pos_c;
|
int pos_c;
|
||||||
|
|
||||||
path_file = buffer.substr(pos+8);
|
path_file = buffer.substr(pos+8);
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ string pandora_version = PANDORA_VERSION;
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Key_Value::parseLine (string str) {
|
Key_Value::parseLine (string str) {
|
||||||
unsigned int pos;
|
int pos;
|
||||||
list<string> tokens;
|
list<string> tokens;
|
||||||
list<string>::iterator iter;
|
list<string>::iterator iter;
|
||||||
string trimmedstr;
|
string trimmedstr;
|
||||||
|
|
|
@ -60,7 +60,7 @@ void
|
||||||
Pandora::Pandora_Agent_Conf::parseFile(string path_file, Collection *aux){
|
Pandora::Pandora_Agent_Conf::parseFile(string path_file, Collection *aux){
|
||||||
ifstream file_conf (path_file.c_str ());
|
ifstream file_conf (path_file.c_str ());
|
||||||
string buffer;
|
string buffer;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
|
|
||||||
if (!file_conf.is_open ()) {
|
if (!file_conf.is_open ()) {
|
||||||
return;
|
return;
|
||||||
|
@ -112,7 +112,7 @@ writeBrokerConf(string path_broker, string filename, string name_broker){
|
||||||
ofstream file_broker ((Pandora::getPandoraInstallDir ()+path_broker).c_str ());
|
ofstream file_broker ((Pandora::getPandoraInstallDir ()+path_broker).c_str ());
|
||||||
string buffer;
|
string buffer;
|
||||||
string comp;
|
string comp;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
int i;
|
int i;
|
||||||
int ok;
|
int ok;
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ writeBrokerConf(string path_broker, string filename, string name_broker){
|
||||||
void
|
void
|
||||||
Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
|
Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
|
||||||
string buffer, filename;
|
string buffer, filename;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
Collection *aux;
|
Collection *aux;
|
||||||
|
|
||||||
filename = Pandora::getPandoraInstallDir ();
|
filename = Pandora::getPandoraInstallDir ();
|
||||||
|
@ -184,7 +184,7 @@ Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
|
||||||
pos = buffer.find("include");
|
pos = buffer.find("include");
|
||||||
if (pos != string::npos){
|
if (pos != string::npos){
|
||||||
string path_file;
|
string path_file;
|
||||||
unsigned pos_c;
|
int pos_c;
|
||||||
|
|
||||||
path_file = buffer.substr(pos+8);
|
path_file = buffer.substr(pos+8);
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ Pandora::Pandora_Agent_Conf::setFile (string *all_conf){
|
||||||
pos = buffer.find("broker_agent");
|
pos = buffer.find("broker_agent");
|
||||||
if (pos != string::npos){
|
if (pos != string::npos){
|
||||||
string path_broker, name_broker;
|
string path_broker, name_broker;
|
||||||
unsigned pos_c;
|
int pos_c;
|
||||||
int position = 0;
|
int position = 0;
|
||||||
|
|
||||||
name_broker = buffer.substr(pos+13);
|
name_broker = buffer.substr(pos+13);
|
||||||
|
@ -266,7 +266,7 @@ void
|
||||||
Pandora::Pandora_Agent_Conf::setFile (string filename) {
|
Pandora::Pandora_Agent_Conf::setFile (string filename) {
|
||||||
ifstream file (filename.c_str ());
|
ifstream file (filename.c_str ());
|
||||||
string buffer;
|
string buffer;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
Collection *aux;
|
Collection *aux;
|
||||||
|
|
||||||
if (this->key_values)
|
if (this->key_values)
|
||||||
|
@ -292,7 +292,7 @@ Pandora::Pandora_Agent_Conf::setFile (string filename) {
|
||||||
pos = buffer.find("include");
|
pos = buffer.find("include");
|
||||||
if (pos != string::npos){
|
if (pos != string::npos){
|
||||||
string path_file;
|
string path_file;
|
||||||
unsigned pos_c;
|
int pos_c;
|
||||||
|
|
||||||
path_file = buffer.substr(pos+8);
|
path_file = buffer.substr(pos+8);
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ int
|
||||||
Pandora_Windows_Service::count_broker_agents(){
|
Pandora_Windows_Service::count_broker_agents(){
|
||||||
string buffer;
|
string buffer;
|
||||||
string filename;
|
string filename;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
int num = 0;
|
int num = 0;
|
||||||
|
|
||||||
filename = Pandora::getPandoraInstallDir ();
|
filename = Pandora::getPandoraInstallDir ();
|
||||||
|
@ -173,7 +173,7 @@ Pandora_Windows_Service::count_broker_agents(){
|
||||||
void
|
void
|
||||||
Pandora_Windows_Service::check_broker_agents(string *all_conf){
|
Pandora_Windows_Service::check_broker_agents(string *all_conf){
|
||||||
string buffer, filename;
|
string buffer, filename;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
int pos_file = 0;
|
int pos_file = 0;
|
||||||
|
|
||||||
filename = Pandora::getPandoraInstallDir ();
|
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;
|
string custom_id, url_address, latitude, longitude, altitude, position_description, gis_exec, gis_result;
|
||||||
time_t ctime;
|
time_t ctime;
|
||||||
struct tm *ctime_tm = NULL;
|
struct tm *ctime_tm = NULL;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
|
|
||||||
// Get agent name
|
// Get agent name
|
||||||
agent_name = conf->getValue ("agent_name");
|
agent_name = conf->getValue ("agent_name");
|
||||||
|
@ -1341,7 +1341,7 @@ string
|
||||||
Pandora_Windows_Service::checkAgentName(string filename){
|
Pandora_Windows_Service::checkAgentName(string filename){
|
||||||
string name_agent = "";
|
string name_agent = "";
|
||||||
string buffer;
|
string buffer;
|
||||||
unsigned int pos;
|
int pos;
|
||||||
ifstream file (filename.c_str ());
|
ifstream file (filename.c_str ());
|
||||||
|
|
||||||
while (!file.eof ()) {
|
while (!file.eof ()) {
|
||||||
|
|
Loading…
Reference in New Issue