Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Mar 2008 07:36:18 +0300
From:      =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0JvQvtGF0LDQvdGB0LrQuNC5?= <d.lohansky@zsupport.ru>
To:        ports@FreeBSD.org
Subject:   patch for net-mgmt/zabbix
Message-ID:  <47DB5242.4040509@zsupport.ru>

next in thread | raw e-mail | index | archive | help

There is  a path "patch-src__libs__zbxcomms__comms.c"

--- src/libs/zbxcomms/comms.c.orig      2008-03-15 07:23:00.000000000 +0300
+++ src/libs/zbxcomms/comms.c   2008-03-15 07:24:09.000000000 +0300
@@ -698,7 +698,7 @@

         for(i = 0; i < s->num_socks; i++) {
  #if !defined(_WINDOWS)
-               if(s->sockets[i] > n)
+               if(s->sockets[i] + 1 > n)
                         n = s->sockets[i] + 1;
  #endif
                 if(FD_ISSET(s->sockets[i], &sock_set))


As I know, in select(ndfs, ...), ndfs must be max descriptor + 1.
So, zabbix have a little bug, some connections in zbx_tcp_accept() will be not accepted,
because their socket descriptors are not in the ndfs.

This patch resolve troubles with "ZBX_TCP_READ() failed [Interrupted system call]" issue
from http://www.zabbix.com/forum/showthread.php?t=8870&mode=linear and other related.


-- 
With best regards, Dmitry Lohansky.

LTD "Z-Solutions"
http://www.zsupport.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47DB5242.4040509>