~ubuntu-branches/ubuntu/lucid/zabbix/lucid

« back to all changes in this revision

Viewing changes to src/zabbix_server/trapper/trapper.c

  • Committer: Bazaar Package Importer
  • Author(s): Emanuele Gentili
  • Date: 2008-08-10 18:37:11 UTC
  • mfrom: (1.1.7 upstream) (8.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080810183711-h4n52nkqqf3iuqhn
Tags: 1:1.4.6-1ubuntu1
* Merge from debian unstable, remaining changes:
 + fixing missing pid directory in /var/run
 + Added the same patch to debian/zabbix-server-{mysql,pgsql}.zabbix-server.init

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
 
214
214
        DBconnect(ZBX_DB_CONNECT_NORMAL);
215
215
 
216
 
        for(;;)
217
 
        {
218
 
                zbx_setproctitle("waiting for connection");
219
 
                zbx_tcp_accept(s);
220
 
 
221
 
                zbx_setproctitle("processing data");
222
 
                process_trapper_child(s);
223
 
 
224
 
                zbx_tcp_unaccept(s);
 
216
        for (;;) {
 
217
                zbx_setproctitle("trapper [waiting for connection]");
 
218
                if (SUCCEED == zbx_tcp_accept(s)) {
 
219
                        zbx_setproctitle("trapper [processing data]");
 
220
                        process_trapper_child(s);
 
221
 
 
222
                        zbx_tcp_unaccept(s);
 
223
                } else
 
224
                        zabbix_log(LOG_LEVEL_WARNING, "Trapper failed to accept connection");
225
225
        }
226
226
        DBclose();
227
227
}