.......... [ZBXNEXT-1506] updated to the latest trunk
.......PS. [ZBX-7534] minor code changes