Show
Ignore:
Timestamp:
09/14/11 15:59:49 (3 years ago)
Author:
gdusbabek <gdusbabek@gmail.com>
git-committer:
gdusbabek <gdusbabek@gmail.com> 1316015989 -0500
git-parent:

[212da6e4b6f6b0af9ea0a9ceba106f42a1ea04df]

git-author:
gdusbabek <gdusbabek@gmail.com> 1316011177 -0500
Message:

fix long line goobers

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/check_test.c

    r212da6e re2422ef  
    9696noit_check_t * 
    9797noit_fire_check(xmlNodePtr attr, xmlNodePtr config, const char **error) { 
    98   char *target = NULL, *name = NULL, *module = NULL, *filterset = NULL, *resolve_rtype = NULL; 
     98  char *target = NULL, *name = NULL, *module = NULL, *filterset = NULL; 
     99  char *resolve_rtype = NULL; 
    99100  int timeout = 0; 
    100101  noit_module_t *m; 
     
    139140  } 
    140141  int flags = NP_TRANSIENT; 
    141   flags |= strcmp(resolve_rtype, PREFER_IPV6) == 0 || strcmp(resolve_rtype, FORCE_IPV6) == 0 ? NP_PREFER_IPV6 : 0; 
    142   flags |= strcmp(resolve_rtype, FORCE_IPV4) == 0 || strcmp(resolve_rtype, FORCE_IPV6) == 0 ? NP_SINGLE_RESOLVE : 0; 
     142  flags |= strcmp(resolve_rtype, PREFER_IPV6) == 0 || 
     143           strcmp(resolve_rtype, FORCE_IPV6) == 0 ? NP_PREFER_IPV6 : 0; 
     144  flags |= strcmp(resolve_rtype, FORCE_IPV4) == 0 || 
     145           strcmp(resolve_rtype, FORCE_IPV6) == 0 ? NP_SINGLE_RESOLVE : 0; 
    143146  c = calloc(1, sizeof(*c)); 
    144147  noit_check_update(c, target, name, filterset, 
  • src/noit_check.c

    r212da6e re2422ef  
    222222    else if(disabled) flags |= NP_DISABLED; 
    223223 
    224     flags |= strcmp(resolve_rtype, PREFER_IPV6) == 0 || strcmp(resolve_rtype, FORCE_IPV6) == 0 ? NP_PREFER_IPV6 : 0; 
    225     flags |= strcmp(resolve_rtype, FORCE_IPV4) == 0 || strcmp(resolve_rtype, FORCE_IPV6) == 0 ? NP_SINGLE_RESOLVE : 0; 
     224    flags |= strcmp(resolve_rtype, PREFER_IPV6) == 0 || 
     225             strcmp(resolve_rtype, FORCE_IPV6) == 0 ? NP_PREFER_IPV6 : 0; 
     226    flags |= strcmp(resolve_rtype, FORCE_IPV4) == 0 || 
     227             strcmp(resolve_rtype, FORCE_IPV6) == 0 ? NP_SINGLE_RESOLVE : 0; 
    226228 
    227229    if(noit_hash_retrieve(&polls, (char *)uuid, UUID_SIZE, 
  • src/noit_check.h

    r212da6e re2422ef  
    163163#define NOIT_CHECK_SHOULD_RESOLVE(a) ((a)->flags & NP_RESOLVE) 
    164164/* It is resolved if it is resolved or never needed to be resolved */ 
    165 #define NOIT_CHECK_RESOLVED(a) (((a)->flags & NP_RESOLVED) || (((a)->flags & NP_RESOLVE) == 0)) 
    166 #define NOIT_CHECK_PREFER_V6(a) (((a)->flags & NP_PREFER_IPV6) == NP_PREFER_IPV6) 
    167 #define NOIT_CHECK_SINGLE_RESOLVE(a) (((a)->flags & NP_SINGLE_RESOLVE) == NP_SINGLE_RESOLVE) 
     165#define NOIT_CHECK_RESOLVED(a) (((a)->flags & NP_RESOLVED) \ 
     166                                || (((a)->flags & NP_RESOLVE) == 0)) 
     167#define NOIT_CHECK_PREFER_V6(a) (((a)->flags & NP_PREFER_IPV6) \ 
     168                                 == NP_PREFER_IPV6) 
     169#define NOIT_CHECK_SINGLE_RESOLVE(a) (((a)->flags & NP_SINGLE_RESOLVE) \ 
     170                                      == NP_SINGLE_RESOLVE) 
    168171 
    169172API_EXPORT(void) noit_poller_init(); 
  • src/noit_check_rest.c

    r212da6e re2422ef  
    247247                              const char **error) { 
    248248  xmlNodePtr root, tl, an; 
    249   int name=0, module=0, target=0, resolve_rtype=0, period=0, timeout=0, filterset=0; 
     249  int name=0, module=0, target=0, resolve_rtype=0, period=0, timeout=0; 
     250  int filterset=0; 
    250251  *a = *c = NULL; 
    251252  root = xmlDocGetRootElement(doc); 
     
    289290          noit_boolean invalid; 
    290291          tmp = xmlNodeGetContent(an); 
    291           invalid = strcmp((char *)tmp, PREFER_IPV4) && strcmp((char *)tmp,PREFER_IPV6) && strcmp((char *)tmp, FORCE_IPV4) && strcmp((char *)tmp, FORCE_IPV6); 
     292          invalid = strcmp((char *)tmp, PREFER_IPV4) && 
     293                    strcmp((char *)tmp,PREFER_IPV6) && 
     294                    strcmp((char *)tmp, FORCE_IPV4) && 
     295                    strcmp((char *)tmp, FORCE_IPV6); 
    292296          xmlFree(tmp); 
    293297          if(invalid) {