Navigation


Changeset 974:2091bf698fb1 in freeDiameter for extensions/acl_wl


Ignore:
Timestamp:
Mar 15, 2013, 2:14:35 AM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Remove newlines from fd_log_debug, TRACE_DEBUG, TRACE_ERROR, and TRACE_DEBUG_ERROR
(as far as sed could find them)
with manual fixing afterwards.

Location:
extensions/acl_wl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/acl_wl/aw_conf.l

    r965 r974  
    9696<*>[[:alnum:]]+         |       /* This rule is only useful to print a complete token in error messages */
    9797<*>.                    {
    98                                 TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
     98                                TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
    9999                                return LEX_ERROR;
    100100                        }
  • extensions/acl_wl/aw_conf.y

    r961 r974  
    7474        if (aw_confin == NULL) {
    7575                ret = errno;
    76                 fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
     76                fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
    7777                TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
    7878                return ret;
     
    102102       
    103103        if (ploc->first_line != ploc->last_line)
    104                 fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
     104                fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
    105105        else if (ploc->first_column != ploc->last_column)
    106                 fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
     106                fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
    107107        else
    108                 fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
     108                fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
    109109}
    110110
  • extensions/acl_wl/aw_tree.c

    r741 r974  
    116116       
    117117#if 0
    118         fd_log_debug("Parsed name %s as:\n", name);
     118        fd_log_debug("Parsed name %s as:", name);
    119119        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);
    121121#endif /* 0 */
    122122        return 0;
     
    179179        for (li = sub->next; li != sub; li = li->next) {
    180180                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?:"*");
    182183                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);
    185186                tree_dump(&ti->children, indent + 1);
    186187        }
     
    190191void aw_tree_dump(void)
    191192{
    192         fd_log_debug("[acl_wl] tree dump:\n(root)\n");
     193        fd_log_debug("[acl_wl] tree dump:");
     194        fd_log_debug("(root)");
    193195        tree_dump(&tree_root, 1);
    194         fd_log_debug("[acl_wl] end of dump\n");
     196        fd_log_debug("[acl_wl] end of dump");
    195197}
    196198
     
    208210        CHECK_FCT_DO( parse_name(name, &sn),
    209211                {
    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);
    211213                        return EINVAL;
    212214                } );
     
    229231                ti = (struct tree_item *)(senti->next);
    230232                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);
    232234                        return 0;
    233235                }
     
    275277        if (sn.label[0].str[0] == '*') {
    276278                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);
    278280                        delete_tree(senti);
    279281                }
     
    286288                        ti = (struct tree_item *)(senti->next);
    287289                        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);
    289291                                return 0;
    290292                        }
     
    310312                                /* We already had this label */
    311313                                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);
    313315                                        ti->flags |= flags;
    314316                                        return 0;
Note: See TracChangeset for help on using the changeset viewer.