- Timestamp:
- 09/14/11 15:59:49 (7 years ago)
- git-parent:
- Files:
-
- src/noit_check_rest.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/noit_check_rest.c
r09ecd28 ra33aa52 197 197 SHOW_ATTR(attr,node,module); 198 198 SHOW_ATTR(attr,node,target); 199 SHOW_ATTR(attr,node,resolve_rtype); 199 200 SHOW_ATTR(attr,node,period); 200 201 SHOW_ATTR(attr,node,timeout); … … 246 247 const char **error) { 247 248 xmlNodePtr root, tl, an; 248 int name=0, module=0, target=0, period=0, timeout=0, filterset=0;249 int name=0, module=0, target=0, resolve_rtype=0, period=0, timeout=0, filterset=0; 249 250 *a = *c = NULL; 250 251 root = xmlDocGetRootElement(doc); … … 283 284 } 284 285 target = 1; 286 } 287 else CHECK_N_SET(resolve_rtype) { 288 xmlChar *tmp; 289 noit_boolean invalid; 290 tmp = xmlNodeGetContent(an); 291 invalid = strcmp((char *)tmp, NP_PREFER_IPV4) && strcmp((char *)tmp, NP_PREFER_IPV6) && strcmp((char *)tmp, NP_FORCE_IPV4) && strcmp((char *)tmp, NP_FORCE_IPV6); 292 xmlFree(tmp); 293 if(invalid) { 294 *error = "invalid reslove_rtype"; 295 return 0; 296 } 297 resolve_rtype = 1; 285 298 } 286 299 else CHECK_N_SET(period) { … … 356 369 ATTR2PROP(name); 357 370 ATTR2PROP(target); 371 ATTR2PROP(resolve_rtype); 358 372 ATTR2PROP(module); 359 373 ATTR2PROP(period);