version 1.1.1.1, 2019/10/21 14:25:31
|
version 1.1.1.2, 2021/03/17 00:07:30
|
Line 11
|
Line 11
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
GNU General Public License for more details. |
GNU General Public License for more details. |
|
|
You should have received a copy of the GNU General Public License | You should have received a copy of the GNU General Public License along |
along with this program; if not, write to the Free Software | with this program; if not, write to the Free Software Foundation, Inc., |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
*/ |
*/ |
|
|
#include "config.h" |
#include "config.h" |
Line 193 static char *split_txtrec(
|
Line 193 static char *split_txtrec(
|
if (i > ctl->ipinfo_max) |
if (i > ctl->ipinfo_max) |
ctl->ipinfo_max = i; |
ctl->ipinfo_max = i; |
if (ctl->ipinfo_no >= i) { |
if (ctl->ipinfo_no >= i) { |
if (ctl->ipinfo_no >= ctl->ipinfo_max) |
|
ctl->ipinfo_no = 0; |
|
return (*items)[0]; |
return (*items)[0]; |
} else |
} else |
return (*items)[ctl->ipinfo_no]; |
return (*items)[ctl->ipinfo_no]; |
Line 309 char *fmt_ipinfo(
|
Line 307 char *fmt_ipinfo(
|
int is_printii( |
int is_printii( |
struct mtr_ctl *ctl) |
struct mtr_ctl *ctl) |
{ |
{ |
return ((ctl->ipinfo_no >= 0) && (ctl->ipinfo_no != ctl->ipinfo_max)); | return (ctl->ipinfo_no >= 0); |
} |
} |
|
|
void asn_open( |
void asn_open( |
struct mtr_ctl *ctl) |
struct mtr_ctl *ctl) |
{ |
{ |
if (ctl->ipinfo_no >= 0) { | DEB_syslog(LOG_INFO, "hcreate(%d)", IIHASH_HI); |
DEB_syslog(LOG_INFO, "hcreate(%d)", IIHASH_HI); | if (!(iihash = hcreate(IIHASH_HI))) |
if (!(iihash = hcreate(IIHASH_HI))) | error(0, errno, "ipinfo hash"); |
error(0, errno, "ipinfo hash"); | |
} | |
} |
} |
|
|
void asn_close( |
void asn_close( |
struct mtr_ctl *ctl) |
struct mtr_ctl *ctl) |
{ |
{ |
if ((ctl->ipinfo_no >= 0) && iihash) { | if (iihash) { |
DEB_syslog(LOG_INFO, "hdestroy()"); |
DEB_syslog(LOG_INFO, "hdestroy()"); |
hdestroy(); |
hdestroy(); |
iihash = 0; |
iihash = 0; |