Changeset 01144b78af5408a407165c8b36e6a644cc9d3696

Show
Ignore:
Timestamp:
02/21/11 22:23:13 (7 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1298326993 +0000
git-parent:

[8d403778d8b836418f22a2ee3112cc0e50861f5c]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1298326993 +0000
Message:

print an error if this occurs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check.c

    re06e00e r01144b7  
    3838#include <ctype.h> 
    3939#include <assert.h> 
     40#include <errno.h> 
    4041#include <netinet/in.h> 
    4142#include <arpa/inet.h> 
     
    571572  new_check->target_ip[0] = '\0'; 
    572573  if(failed == 0) 
    573     inet_ntop(new_check->target_family, 
    574               &new_check->target_addr, 
    575               new_check->target_ip, 
    576               sizeof(new_check->target_ip)); 
     574    if(inet_ntop(new_check->target_family, 
     575                 &new_check->target_addr, 
     576                 new_check->target_ip, 
     577                 sizeof(new_check->target_ip)) == NULL) { 
     578      noitL(noit_error, "inet_ntop failed [%s] -> %d\n", ip_str, errno); 
     579    } 
    577580  return failed; 
    578581}