Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-14855

misleading process type assignment

    XMLWordPrintable

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 46, Nov 2018, Sprint 47, Dec 2018
    • Story Points:
      0.125

      Description

      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
      

        Attachments

          Activity

            People

            Assignee:
            asitals Andrejs Sitals
            Reporter:
            mikler Mikhail Makurov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: