........S. [ZBX-8359] fixed code error in process_events() where it would always return 0 independent of events processed