-
Problem report
-
Resolution: Fixed
-
Trivial
-
3.4.14, 4.0.0beta2
-
Linux
-
Sprint 46, Nov 2018, Sprint 47, Dec 2018
-
0.125
While playing around with sources and adding new type of poller i found a misconcept in the code wich i suggest to fix:
On server.c there is a switch which assigns type of poller depending of type of process:
switch (thread_args.process_type)
{
case ZBX_PROCESS_TYPE_CONFSYNCER:
threads[i] = zbx_thread_start(dbconfig_thread, &thread_args);
break;
case ZBX_PROCESS_TYPE_POLLER:
poller_type = ZBX_PROCESS_TYPE_POLLER;
thread_args.args = &poller_type;
threads[i] = zbx_thread_start(poller_thread, &thread_args);
break;
case ZBX_PROCESS_TYPE_UNREACHABLE:
poller_type = ZBX_PROCESS_TYPE_UNREACHABLE;
thread_args.args = &poller_type;
threads[i] = zbx_thread_start(poller_thread, &thread_args);
break;
This however there are also poller types defined in dbcache.h
I suggest assigning instead of asigning
poller_type=ZBX_PROCESS_TYPE_UNREACHABLE;
do assignement of correct poller type:
poller_type = ZBX_POLLER_TYPE_UNREACHABLE