Changeset 974:2091bf698fb1 in freeDiameter for extensions/acl_wl/aw_tree.c
- Timestamp:
- Mar 15, 2013, 2:14:35 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/acl_wl/aw_tree.c
r741 r974 116 116 117 117 #if 0 118 fd_log_debug("Parsed name %s as: \n", name);118 fd_log_debug("Parsed name %s as:", name); 119 119 for (i=0; i<=l; i++) 120 fd_log_debug(" str[%d] len: %d, v:%.*s \n", i, result->label[i].len, result->label[i].len, result->label[i].str);120 fd_log_debug(" str[%d] len: %d, v:%.*s", i, result->label[i].len, result->label[i].len, result->label[i].str); 121 121 #endif /* 0 */ 122 122 return 0; … … 179 179 for (li = sub->next; li != sub; li = li->next) { 180 180 struct tree_item * ti = (struct tree_item *)li; 181 fd_log_debug("%*s%s", indent * 2, "", ti->str?:"*"); 181 char buf[1024]; 182 snprintf(buf, sizeof(buf), "%*s%s", indent * 2, "", ti->str?:"*"); 182 183 if (ti->leaf) 183 fd_log_debug(" (flag:%x)", ti->flags);184 fd_log_debug(" \n");184 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), " (flag:%x)", ti->flags); 185 fd_log_debug("%s", buf); 185 186 tree_dump(&ti->children, indent + 1); 186 187 } … … 190 191 void aw_tree_dump(void) 191 192 { 192 fd_log_debug("[acl_wl] tree dump:\n(root)\n"); 193 fd_log_debug("[acl_wl] tree dump:"); 194 fd_log_debug("(root)"); 193 195 tree_dump(&tree_root, 1); 194 fd_log_debug("[acl_wl] end of dump \n");196 fd_log_debug("[acl_wl] end of dump"); 195 197 } 196 198 … … 208 210 CHECK_FCT_DO( parse_name(name, &sn), 209 211 { 210 fd_log_debug("The name '%s' contains too many labels, try a generic (*) or recompile with bigger AW_TREE_MAXDEPTH value (cur: %d) \n", name, AW_TREE_MAXDEPTH);212 fd_log_debug("The name '%s' contains too many labels, try a generic (*) or recompile with bigger AW_TREE_MAXDEPTH value (cur: %d)", name, AW_TREE_MAXDEPTH); 211 213 return EINVAL; 212 214 } ); … … 229 231 ti = (struct tree_item *)(senti->next); 230 232 if (ti->str == NULL) { 231 fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label %d, ignoring. \n", name, lbl + 1);233 fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label %d, ignoring.", name, lbl + 1); 232 234 return 0; 233 235 } … … 275 277 if (sn.label[0].str[0] == '*') { 276 278 if (!FD_IS_LIST_EMPTY(senti)) { 277 fd_log_debug("[acl_wl] Warning: entry '%s' overwrites previous more detailed entries, these are deleted. \n", name);279 fd_log_debug("[acl_wl] Warning: entry '%s' overwrites previous more detailed entries, these are deleted.", name); 278 280 delete_tree(senti); 279 281 } … … 286 288 ti = (struct tree_item *)(senti->next); 287 289 if (ti->str == NULL) { 288 fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label 1, ignoring. \n", name);290 fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label 1, ignoring.", name); 289 291 return 0; 290 292 } … … 310 312 /* We already had this label */ 311 313 if (ti->leaf) { 312 fd_log_debug("[acl_wl] Warning: entry '%s' is duplicated, merging the flags. \n", name);314 fd_log_debug("[acl_wl] Warning: entry '%s' is duplicated, merging the flags.", name); 313 315 ti->flags |= flags; 314 316 return 0;
Note: See TracChangeset
for help on using the changeset viewer.