summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-19 12:07:46 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-19 12:07:46 +0000
commitbbadd78fb2a0ef624b1503f647157f58e93ab474 (patch)
treee8b09916e091a9882e858e3d6170e96514d17ba6 /src/libs
parent46e7eba7e031f101a82973caae71c2a0c1882cca (diff)
- tested and fixed jabber messager (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3836 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/zbxcommon/misc.c1
-rw-r--r--src/libs/zbxcommon/str.c2
-rw-r--r--src/libs/zbxcomms/comms.c6
-rw-r--r--src/libs/zbxdb/db.c82
-rw-r--r--src/libs/zbxdbhigh/db.c17
-rw-r--r--src/libs/zbxjabber/jabber.c17
-rw-r--r--src/libs/zbxlog/log.c4
-rw-r--r--src/libs/zbxnet/security.c11
-rw-r--r--src/libs/zbxnix/daemon.c3
-rw-r--r--src/libs/zbxsys/mutexs.c15
-rw-r--r--src/libs/zbxsysinfo/common/common.c12
11 files changed, 93 insertions, 77 deletions
diff --git a/src/libs/zbxcommon/misc.c b/src/libs/zbxcommon/misc.c
index 97b26565..53503a07 100644
--- a/src/libs/zbxcommon/misc.c
+++ b/src/libs/zbxcommon/misc.c
@@ -224,7 +224,6 @@ int calculate_item_nextcheck(int itemid, int item_type, int delay, char *delay_f
******************************************************************************/
int check_time_period(const char *period, time_t now)
{
- //time_t now;
char tmp[MAX_STRING_LEN];
char *s;
int d1,d2,h1,h2,m1,m2;
diff --git a/src/libs/zbxcommon/str.c b/src/libs/zbxcommon/str.c
index 65886297..5e808587 100644
--- a/src/libs/zbxcommon/str.c
+++ b/src/libs/zbxcommon/str.c
@@ -133,7 +133,7 @@ int find_char(char *str,char c)
* Author: Eugene Grigorjev *
* *
******************************************************************************/
-//#define ZBX_STDERR_FILE "zbx_errors.log"
+/* #define ZBX_STDERR_FILE "zbx_errors.log" */
void zbx_error(const char *fmt, ...)
{
diff --git a/src/libs/zbxcomms/comms.c b/src/libs/zbxcomms/comms.c
index 3bd18b46..b6998a4c 100644
--- a/src/libs/zbxcomms/comms.c
+++ b/src/libs/zbxcomms/comms.c
@@ -80,7 +80,7 @@ int zbx_tcp_connect(zbx_sock_t *s, char *ip, int port)
if(NULL == (hp = zbx_gethost(ip)))
{
-// zabbix_log( LOG_LEVEL_WARNING, "Cannot resolve [%s]", ip);
+/* zabbix_log( LOG_LEVEL_WARNING, "Cannot resolve [%s]", ip); */
return FAIL;
}
@@ -91,7 +91,7 @@ int zbx_tcp_connect(zbx_sock_t *s, char *ip, int port)
s->socket = socket(AF_INET,SOCK_STREAM,0);
if(s->socket == -1)
{
-// zabbix_log( LOG_LEVEL_WARNING, "Cannot create socket [%s:%d] [%s]", ip, port ,strerror(errno));
+/* zabbix_log( LOG_LEVEL_WARNING, "Cannot create socket [%s:%d] [%s]", ip, port ,strerror(errno)); */
return FAIL;
}
@@ -101,7 +101,7 @@ int zbx_tcp_connect(zbx_sock_t *s, char *ip, int port)
if( connect(s->socket,(struct sockaddr *)&servaddr_in,sizeof(struct sockaddr_in)) == -1 )
{
-// zabbix_log( LOG_LEVEL_WARNING, "Cannot connect to [%s:%d] [%s]", ip, port, strerror(errno));
+/* zabbix_log( LOG_LEVEL_WARNING, "Cannot connect to [%s:%d] [%s]", ip, port, strerror(errno)); */
zbx_tcp_close(s);
return FAIL;
}
diff --git a/src/libs/zbxdb/db.c b/src/libs/zbxdb/db.c
index 6e8afb01..dd0ee138 100644
--- a/src/libs/zbxdb/db.c
+++ b/src/libs/zbxdb/db.c
@@ -35,16 +35,16 @@
#ifdef HAVE_SQLITE3
int sqlite_transaction_started = 0;
- sqlite3 *sqlite;
+ sqlite3 *conn = NULL;
PHP_MUTEX sqlite_access;
#endif
#ifdef HAVE_MYSQL
- MYSQL mysql;
+ MYSQL *conn = NULL;
#endif
#ifdef HAVE_POSTGRESQL
- PGconn *conn;
+ PGconn *conn = NULL;
#endif
#ifdef HAVE_ORACLE
@@ -54,18 +54,20 @@
void zbx_db_close(void)
{
#ifdef HAVE_MYSQL
- mysql_close(&mysql);
+ mysql_close(conn);
+ conn = NULL;
#endif
#ifdef HAVE_POSTGRESQL
PQfinish(conn);
+ conn = NULL
#endif
#ifdef HAVE_ORACLE
sqlo_finish(oracle);
#endif
#ifdef HAVE_SQLITE3
sqlite_transaction_started = 0;
- sqlite3_close(sqlite);
-
+ sqlite3_close(conn);
+ conn = NULL;
php_sem_remove(&sqlite_access);
#endif
}
@@ -82,40 +84,40 @@ int zbx_db_connect(char *host, char *user, char *password, char *dbname, char *d
/* zabbix_log(LOG_LEVEL_ERR, "[%s] [%s] [%s]\n",dbname, dbuser, dbpassword ); */
#ifdef HAVE_MYSQL
/* For MySQL >3.22.00 */
- /* if( ! mysql_connect( &mysql, NULL, dbuser, dbpassword ) )*/
+ /* if( ! mysql_connect( conn, NULL, dbuser, dbpassword ) )*/
- mysql_init(&mysql);
+ conn = mysql_init(NULL);
- if( ! mysql_real_connect( &mysql, host, user, password, dbname, port, dbsocket,0 ) )
+ if( ! mysql_real_connect( conn, host, user, password, dbname, port, dbsocket,0 ) )
{
zabbix_log(LOG_LEVEL_ERR, "Failed to connect to database: Error: %s [%d]",
- mysql_error(&mysql), mysql_errno(&mysql));
+ mysql_error(conn), mysql_errno(conn));
ret = ZBX_DB_FAIL;
}
if(ZBX_DB_OK == ret)
{
- if( mysql_select_db( &mysql, dbname ) != 0 )
+ if( mysql_select_db( conn, dbname ) != 0 )
{
zabbix_log(LOG_LEVEL_ERR, "Failed to select database: Error: %s [%d]",
- mysql_error(&mysql), mysql_errno(&mysql));
+ mysql_error(conn), mysql_errno(conn));
ret = ZBX_DB_FAIL;
}
}
if(ZBX_DB_OK == ret)
{
- if(mysql_autocommit(&mysql, 1) != 0)
+ if(mysql_autocommit(conn, 1) != 0)
{
zabbix_log(LOG_LEVEL_ERR, "Failed to set autocommit to 1: Error: %s [%d]",
- mysql_error(&mysql), mysql_errno(&mysql));
+ mysql_error(conn), mysql_errno(conn));
ret = ZBX_DB_FAIL;
}
}
if(ZBX_DB_FAIL == ret)
{
- switch(mysql_errno(&mysql)) {
+ switch(mysql_errno(conn)) {
case CR_SERVER_GONE_ERROR:
case CR_CONNECTION_ERROR:
ret = ZBX_DB_DOWN;
@@ -160,18 +162,18 @@ int zbx_db_connect(char *host, char *user, char *password, char *dbname, char *d
#ifdef HAVE_SQLITE3
int res;
- res = sqlite3_open(name, &sqlite);
+ res = sqlite3_open(name, &conn);
/* check to see that the backend connection was successfully made */
if(res)
{
- zabbix_log(LOG_LEVEL_ERR, "Can't open database [%s]: %s\n", name, sqlite3_errmsg(sqlite));
+ zabbix_log(LOG_LEVEL_ERR, "Can't open database [%s]: %s\n", name, sqlite3_errmsg(conn));
DBclose();
exit(FAIL);
}
/* Do not return SQLITE_BUSY immediately, wait for N ms */
- sqlite3_busy_timeout(sqlite, 60*1000);
+ sqlite3_busy_timeout(conn, 60*1000);
if(ZBX_MUTEX_ERROR == php_sem_get(&sqlite_access, name))
{
@@ -348,13 +350,21 @@ int zbx_db_vexecute(const char *fmt, va_list args)
zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s", sql);
#ifdef HAVE_MYSQL
- if(mysql_query(&mysql,sql) != 0)
+ if(!conn)
{
- ret = (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)?ZBX_DB_DOWN:ZBX_DB_FAIL;
+ zabbix_log( LOG_LEVEL_ERR, "Query executing require connection to database!");
+ ret = ZBX_DB_FAIL;
}
else
{
- ret = (int)mysql_affected_rows(&mysql);
+ if(mysql_query(conn,sql) != 0)
+ {
+ ret = (mysql_errno(conn) == CR_SERVER_GONE_ERROR)?ZBX_DB_DOWN:ZBX_DB_FAIL;
+ }
+ else
+ {
+ ret = (int)mysql_affected_rows(conn);
+ }
}
#endif
#ifdef HAVE_POSTGRESQL
@@ -398,7 +408,7 @@ int zbx_db_vexecute(const char *fmt, va_list args)
}
lbl_exec:
- if(SQLITE_OK != (ret = sqlite3_exec(sqlite, sql, NULL, 0, &error)))
+ if(SQLITE_OK != (ret = sqlite3_exec(conn, sql, NULL, 0, &error)))
{
if(ret == SQLITE_BUSY) goto lbl_exec; /* attention deadlock!!! */
@@ -474,6 +484,8 @@ void SQ_DBfree_result(DB_RESULT result)
DB_ROW zbx_db_fetch(DB_RESULT result)
{
#ifdef HAVE_MYSQL
+ if(!result) return NULL;
+
return mysql_fetch_row(result);
#endif
#ifdef HAVE_POSTGRESQL
@@ -543,6 +555,8 @@ DB_ROW zbx_db_fetch(DB_RESULT result)
return &(result->data[result->curow * result->ncolumn]);
#endif
+
+ return NULL;
}
/*
@@ -573,15 +587,23 @@ DB_RESULT zbx_db_vselect(const char *fmt, va_list args)
zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s", sql);
#ifdef HAVE_MYSQL
- if(mysql_query(&mysql,sql) != 0)
+ if(!conn)
{
- zabbix_log( LOG_LEVEL_ERR, "Query::%s",sql);
- zabbix_log(LOG_LEVEL_ERR, "Query failed:%s [%d]", mysql_error(&mysql), mysql_errno(&mysql) );
- result = (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)?(DB_RESULT)ZBX_DB_DOWN:(DB_RESULT)ZBX_DB_FAIL;
+ zabbix_log( LOG_LEVEL_ERR, "Query executing require connection to database!");
+ result = NULL;
}
else
{
- result = mysql_store_result(&mysql);
+ if(mysql_query(conn,sql) != 0)
+ {
+ zabbix_log( LOG_LEVEL_ERR, "Query::%s",sql);
+ zabbix_log(LOG_LEVEL_ERR, "Query failed:%s [%d]", mysql_error(conn), mysql_errno(conn) );
+ result = (mysql_errno(conn) == CR_SERVER_GONE_ERROR)?(DB_RESULT)ZBX_DB_DOWN:(DB_RESULT)ZBX_DB_FAIL;
+ }
+ else
+ {
+ result = mysql_store_result(conn);
+ }
}
#endif
#ifdef HAVE_POSTGRESQL
@@ -628,7 +650,7 @@ DB_RESULT zbx_db_vselect(const char *fmt, va_list args)
result->curow = 0;
lbl_get_table:
- if(SQLITE_OK != (ret = sqlite3_get_table(sqlite,sql,&result->data,&result->nrow, &result->ncolumn, &error)))
+ if(SQLITE_OK != (ret = sqlite3_get_table(conn,sql,&result->data,&result->nrow, &result->ncolumn, &error)))
{
if(ret == SQLITE_BUSY) goto lbl_get_table; /* attention deadlock!!! */
@@ -666,7 +688,7 @@ zbx_uint64_t zbx_db_insert_id(int exec_result, const char *table, const char *fi
if(exec_result == FAIL) return 0;
- return mysql_insert_id(&mysql);
+ return mysql_insert_id(conn);
#endif
#ifdef HAVE_POSTGRESQL
@@ -712,7 +734,7 @@ zbx_uint64_t zbx_db_insert_id(int exec_result, const char *table, const char *fi
return id;
#endif
#ifdef HAVE_SQLITE3
- return (zbx_uint64_t)sqlite3_last_insert_rowid(sqlite);
+ return (zbx_uint64_t)sqlite3_last_insert_rowid(conn);
#endif
}
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c
index b73d718b..458a7520 100644
--- a/src/libs/zbxdbhigh/db.c
+++ b/src/libs/zbxdbhigh/db.c
@@ -35,6 +35,7 @@
#include "common.h"
#include "actions.h"
#include "events.h"
+#include "threads.h"
void DBclose(void)
{
@@ -48,17 +49,13 @@ void DBclose(void)
*/
void DBconnect(int flag)
{
- int i;
-
- int loop = 0;
+ int err;
- while(loop == 0)
- {
- i = zbx_db_connect(CONFIG_DBHOST, CONFIG_DBUSER, CONFIG_DBPASSWORD, CONFIG_DBNAME, CONFIG_DBSOCKET, CONFIG_DBPORT);
+ do {
+ err = zbx_db_connect(CONFIG_DBHOST, CONFIG_DBUSER, CONFIG_DBPASSWORD, CONFIG_DBNAME, CONFIG_DBSOCKET, CONFIG_DBPORT);
- switch(i) {
+ switch(err) {
case ZBX_DB_OK:
- loop = 1;
break;
case ZBX_DB_DOWN:
if(flag == ZBX_DB_CONNECT_EXIT)
@@ -68,13 +65,13 @@ void DBconnect(int flag)
else
{
zabbix_log(LOG_LEVEL_WARNING, "Database is down. Reconnecting in 10 seconds");
- sleep(10);
+ zbx_sleep(10);
}
break;
default:
exit(FAIL);
}
- }
+ } while(ZBX_DB_OK != err);
}
/******************************************************************************
diff --git a/src/libs/zbxjabber/jabber.c b/src/libs/zbxjabber/jabber.c
index ba13a592..d29b589c 100644
--- a/src/libs/zbxjabber/jabber.c
+++ b/src/libs/zbxjabber/jabber.c
@@ -62,14 +62,14 @@ typedef struct jabber_session {
static jabber_session_p jsess = NULL;
-int on_result (jabber_session_p sess, ikspak *pak)
+static int on_result (jabber_session_p sess, ikspak *pak)
{
zabbix_log (LOG_LEVEL_DEBUG, "JABBER: ready");
sess->status = JABBER_READY;
return IKS_FILTER_EAT;
}
-int disconnect_jabber()
+static int disconnect_jabber()
{
zabbix_log(LOG_LEVEL_INFORMATION, "JABBER: disconnecting");
iks_disconnect(jsess->prs);
@@ -79,7 +79,7 @@ int disconnect_jabber()
return SUCCEED;
}
-int on_stream (jabber_session_p sess, int type, iks *node)
+static int on_stream (jabber_session_p sess, int type, iks *node)
{
iks *x = NULL;
ikspak *pak = NULL;
@@ -154,13 +154,13 @@ int on_stream (jabber_session_p sess, int type, iks *node)
return IKS_OK;
}
-int on_error (void *user_data, ikspak *pak)
+static int on_error (void *user_data, ikspak *pak)
{
zabbix_log (LOG_LEVEL_WARNING, "JABBER: authorization failed");
return IKS_FILTER_EAT;
}
-void on_log (jabber_session_p sess, const char *data, size_t size, int is_incoming)
+static void on_log (jabber_session_p sess, const char *data, size_t size, int is_incoming)
{
char msg[16] = "";
if (iks_is_secure (sess->prs)) strcat(msg, "Sec");
@@ -168,7 +168,7 @@ void on_log (jabber_session_p sess, const char *data, size_t size, int is_incomi
zabbix_log(LOG_LEVEL_DEBUG, "%s [%s]\n", msg, data);
}
-void j_setup_filter (jabber_session_p sess)
+static void j_setup_filter (jabber_session_p sess)
{
if (sess->my_filter) iks_filter_delete (sess->my_filter);
sess->my_filter = iks_filter_new ();
@@ -184,7 +184,7 @@ void j_setup_filter (jabber_session_p sess)
IKS_RULE_DONE);
}
-int connect_jabber(char *jabber_id, char *password, int use_sasl, char *error, int len)
+static int connect_jabber(char *jabber_id, char *password, int use_sasl, char *error, int len)
{
char *buf = NULL;
@@ -274,7 +274,8 @@ int send_jabber(char *username, char *passwd, char *sendto, char *message, char
zabbix_log( LOG_LEVEL_DEBUG, "JABBER: sending message");
if (NULL == jsess || jsess->status == JABBER_DISCONNECTED || jsess->status == JABBER_ERROR) {
- connect_jabber(username, passwd, 1, error, max_error_len);
+ if (SUCCEED != connect_jabber(username, passwd, 1, error, max_error_len))
+ return FAIL;
}
if ( NULL == (x = iks_new ("message")) ||
diff --git a/src/libs/zbxlog/log.c b/src/libs/zbxlog/log.c
index 0be91741..3fdb06cd 100644
--- a/src/libs/zbxlog/log.c
+++ b/src/libs/zbxlog/log.c
@@ -104,7 +104,7 @@ int zabbix_open_log(int type, int level, const char *filename)
return FAIL;
}
- if(ZBX_MUTEX_ERROR == zbx_mutex_create(&log_file_access, ZBX_MUTEX_LOG))
+ if(ZBX_MUTEX_ERROR == zbx_mutex_create_force(&log_file_access, ZBX_MUTEX_LOG))
{
zbx_error("Unable to create mutex for log file");
return FAIL;
@@ -124,7 +124,7 @@ int zabbix_open_log(int type, int level, const char *filename)
{
/* Not supported logging type */
- if(ZBX_MUTEX_ERROR == zbx_mutex_create(&log_file_access, ZBX_MUTEX_LOG))
+ if(ZBX_MUTEX_ERROR == zbx_mutex_create_force(&log_file_access, ZBX_MUTEX_LOG))
{
zbx_error("Unable to create mutex for log file");
return FAIL;
diff --git a/src/libs/zbxnet/security.c b/src/libs/zbxnet/security.c
index 4a4376d6..9f66a4d1 100644
--- a/src/libs/zbxnet/security.c
+++ b/src/libs/zbxnet/security.c
@@ -17,17 +17,6 @@
** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
-
-//#include <sys/types.h>
-//#include <sys/socket.h>
-//#include <netinet/in.h>
-//#include <arpa/inet.h>
-//#include <netdb.h>
-
-//#include <string.h>
-
-//#include <errno.h>
-
#include "common.h"
#include "zbxsock.h"
#include "log.h"
diff --git a/src/libs/zbxnix/daemon.c b/src/libs/zbxnix/daemon.c
index 9063605f..3a3deb9d 100644
--- a/src/libs/zbxnix/daemon.c
+++ b/src/libs/zbxnix/daemon.c
@@ -20,6 +20,7 @@
#include "common.h"
#include "daemon.h"
+#include "mutexs.h"
#include "pid.h"
#include "cfg.h"
#include "log.h"
@@ -147,7 +148,7 @@ int daemon_start(int allow_root)
#endif /* HAVE_SYS_RESOURCE_SETPRIORITY */
-//------------------------------------------------
+/*------------------------------------------------*/
if( FAIL == create_pid_file(APP_PID_FILE))
{
diff --git a/src/libs/zbxsys/mutexs.c b/src/libs/zbxsys/mutexs.c
index c392e38d..292c1032 100644
--- a/src/libs/zbxsys/mutexs.c
+++ b/src/libs/zbxsys/mutexs.c
@@ -47,21 +47,23 @@
/******************************************************************************
* *
- * Function: zbx_mutex_create *
+ * Function: zbx_mutex_create_ext *
* *
* Purpose: Create the mutex *
* *
* Parameters: mutex - handle of mutex *
+ * name - name of mutex (index for nix system) *
+ * forced - remove mutex if exist (only for nix) *
* *
* Return value: If the function succeeds, the return ZBX_MUTEX_OK, *
* ZBX_MUTEX_ERROR on an error *
* *
* Author: Eugene Grigorjev *
* *
- * Comments: *
+ * Comments: you can use alias 'zbx_mutex_create' and 'zbx_mutex_create_force'*
* *
******************************************************************************/
-int zbx_mutex_create(ZBX_MUTEX *mutex, ZBX_MUTEX_NAME name)
+int zbx_mutex_create_ext(ZBX_MUTEX *mutex, ZBX_MUTEX_NAME name, unsigned char forced)
{
#if defined(_WINDOWS)
@@ -89,11 +91,11 @@ int zbx_mutex_create(ZBX_MUTEX *mutex, ZBX_MUTEX_NAME name)
}
}
+lbl_create:
if ( -1 != (ZBX_SEM_LIST_ID = semget(sem_key, ZBX_MUTEX_COUNT, IPC_CREAT | IPC_EXCL | 0666 /* 0022 */)) )
{
/* set default semaphore value */
semopts.val = 1;
-
for ( i = 0; i < ZBX_MUTEX_COUNT; i++ )
{
if(-1 == semctl(ZBX_SEM_LIST_ID, i, SETVAL, semopts))
@@ -110,6 +112,11 @@ int zbx_mutex_create(ZBX_MUTEX *mutex, ZBX_MUTEX_NAME name)
{
ZBX_SEM_LIST_ID = semget(sem_key, ZBX_MUTEX_COUNT, 0666 /* 0022 */);
semopts.buf = &seminfo;
+
+ if(forced) {
+ semctl(ZBX_SEM_LIST_ID, 0, IPC_RMID, 0);
+ goto lbl_create;
+ }
/* wait for initialization */
for ( i = 0; i < ZBX_MUTEX_MAX_TRIES; i++)
diff --git a/src/libs/zbxsysinfo/common/common.c b/src/libs/zbxsysinfo/common/common.c
index f72a7fd0..684d2964 100644
--- a/src/libs/zbxsysinfo/common/common.c
+++ b/src/libs/zbxsysinfo/common/common.c
@@ -941,7 +941,7 @@ int getPROC2(char *file, char *param, int fieldno, unsigned flags, int type, AGE
return SYSINFO_RET_FAIL;
}
- // find line
+ /* find line */
found = 0;
while ( fgets(buf, MAX_STRING_LEN, f) != NULL )
{
@@ -954,8 +954,8 @@ int getPROC2(char *file, char *param, int fieldno, unsigned flags, int type, AGE
if (!found) return SYSINFO_RET_FAIL;
- // find field
- res = (char *)strtok(buf, " "); // btime field1 field2
+ /* find field */
+ res = (char *)strtok(buf, " "); /* btime field1 field2 */
for(i=1; i<=fieldno; i++)
{
res = (char *)strtok(NULL," ");
@@ -968,7 +968,7 @@ int getPROC2(char *file, char *param, int fieldno, unsigned flags, int type, AGE
return SYSINFO_RET_FAIL;
}
- // convert field to right type
+ /* convert field to right type */
switch (type)
{
case AR_UINT64:
@@ -1272,7 +1272,7 @@ int EXECUTE_STR(const char *cmd, const char *param, unsigned flags, AGENT_RESULT
{
zabbix_log(LOG_LEVEL_DEBUG, "Unable to create process: '%s' [%s]", command, strerror_from_system(GetLastError()));
- // Remove temporary file
+ /* Remove temporary file */
CloseHandle(hOutput);
DeleteFile(szTempFile);
@@ -1292,7 +1292,7 @@ int EXECUTE_STR(const char *cmd, const char *param, unsigned flags, AGENT_RESULT
cmd_result[len] = '\0';
- // Remove temporary file
+ /* Remove temporary file */
CloseHandle(hOutput);
DeleteFile(szTempFile);