From cdc279ffd0bc6428c338009856acc2374299db6c Mon Sep 17 00:00:00 2001 From: hugetoad Date: Thu, 17 Feb 2005 21:05:05 +0000 Subject: - fix for startup of housekeeping process (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@1665 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- ChangeLog | 1 + src/zabbix_server/server.c | 14 ++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab74171d..e31a2ed9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ Changes for 1.1alpha6: + - fix for startup of housekeeping process (Alexei) - fix of agent crash on 64 bit platforms in CKSUM() (Alexei) - added frontends/php/overview.php (Alexei) - removed link to unexistant trends.php (Alexei) diff --git a/src/zabbix_server/server.c b/src/zabbix_server/server.c index 25ac5c1e..8379dbcd 100644 --- a/src/zabbix_server/server.c +++ b/src/zabbix_server/server.c @@ -120,7 +120,7 @@ void uninit(void) { if(pids != NULL) { - for(i=0;i0) { - return (pid); + return (pid); + } + else + { +// sucker_num=i; } /* never returns */ @@ -1331,7 +1335,7 @@ int main(int argc, char **argv) return 0; #endif DBclose(); - pids=calloc(CONFIG_SUCKERD_FORKS-1,sizeof(pid_t)); + pids=calloc(CONFIG_SUCKERD_FORKS+CONFIG_TRAPPERD_FORKS-1,sizeof(pid_t)); #ifdef ZABBIX_THREADS my_init(); @@ -1372,8 +1376,6 @@ int main(int argc, char **argv) listenfd = tcp_listen(host,CONFIG_LISTEN_PORT,&addrlen); - pids = calloc(CONFIG_TRAPPERD_FORKS, sizeof(pid_t)); - for(i = CONFIG_SUCKERD_FORKS; i< CONFIG_SUCKERD_FORKS+CONFIG_TRAPPERD_FORKS; i++) { pids[i] = child_trapper_make(i, listenfd, addrlen); @@ -1386,7 +1388,7 @@ int main(int argc, char **argv) else if(sucker_num == 1) { /* Second instance of zabbix_suckerd sends alerts to users */ - zabbix_log( LOG_LEVEL_WARNING, " #server %d started [Alerter]",sucker_num); + zabbix_log( LOG_LEVEL_WARNING, "server #%d started [Alerter]",sucker_num); main_alerter_loop(); } else if(sucker_num == 2) -- cgit