Changeset 974:2091bf698fb1 in freeDiameter for extensions/app_redirect
- Timestamp:
- Mar 15, 2013, 2:14:35 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- extensions/app_redirect
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_redirect/ard_conf.l
r740 r974 82 82 if (ret != 1) { 83 83 /* No matching: an error occurred */ 84 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));84 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 85 85 return TOK_LEX_ERROR; /* trig an error in yacc parser */ 86 86 /* Maybe we could REJECT instead of failing here? */ … … 94 94 CHECK_MALLOC_DO( yylval->tstring.str = strdup(yytext+2), 95 95 { 96 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s \n", yytext, strerror(errno));96 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); 97 97 return TOK_LEX_ERROR; /* trig an error in yacc parser */ 98 98 } ); … … 107 107 CHECK_MALLOC_DO( yylval->tstring.str = strdup(yytext+1), 108 108 { 109 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s \n", yytext, strerror(errno));109 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); 110 110 return TOK_LEX_ERROR; /* trig an error in yacc parser */ 111 111 } ); … … 134 134 /* Unrecognized sequence, if it did not match any previous pattern */ 135 135 [^[:space:]\":=;\n]+ { 136 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);136 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 137 137 return TOK_LEX_ERROR; 138 138 } -
extensions/app_redirect/ard_conf.y
r740 r974 76 76 return; 77 77 78 fd_log_debug("app_redirect: configuration dump: \n");79 fd_log_debug(" default_redirect_cache_time : %u sec \n", ard_conf->default_rct);78 fd_log_debug("app_redirect: configuration dump:"); 79 fd_log_debug(" default_redirect_cache_time : %u sec", ard_conf->default_rct); 80 80 for (li = ard_conf->rules.next; li != &ard_conf->rules; li = li->next) { 81 81 ard_rule_dump(li->o); 82 82 } 83 fd_log_debug("app_redirect: end of configuration dump \n");83 fd_log_debug("app_redirect: end of configuration dump"); 84 84 } 85 85 -
extensions/app_redirect/ard_rules.c
r740 r974 54 54 { 55 55 struct fd_list * li; 56 fd_log_debug(" rule @%p: %s, %us \n", r, redir_type_str[r->type], r->rct);56 fd_log_debug(" rule @%p: %s, %us", r, redir_type_str[r->type], r->rct); 57 57 for (li = r->criteria.next; li != &r->criteria; li = li->next) { 58 58 struct ard_criteria * c = li->o; 59 fd_log_debug(" Criteria: ");60 59 switch (c->type) { 61 60 case FROM_ID: 62 fd_log_debug(" received from peer %s'%s'", c->is_regex?"REGEX":"", c->s);61 fd_log_debug(" Criteria: received from peer %s'%s'", c->is_regex?"REGEX":"", c->s); 63 62 break; 64 63 case FROM_REALM: 65 fd_log_debug(" received from realm %s'%s'", c->is_regex?"REGEX":"", c->s);64 fd_log_debug(" Criteria: received from realm %s'%s'", c->is_regex?"REGEX":"", c->s); 66 65 break; 67 66 case APP_ID: 68 fd_log_debug(" application id is %u", c->i);67 fd_log_debug(" Criteria: application id is %u", c->i); 69 68 break; 70 69 case AVP_INT: 71 fd_log_debug(" contains '%s' AVP with value '%d'", c->avp_info.avp_name, c->i);70 fd_log_debug(" Criteria: contains '%s' AVP with value '%d'", c->avp_info.avp_name, c->i); 72 71 break; 73 72 case AVP_STR: 74 fd_log_debug(" contains '%s' AVP with value %s'%s'", c->avp_info.avp_name, c->is_regex?"REGEX":"", c->s);73 fd_log_debug(" Criteria: contains '%s' AVP with value %s'%s'", c->avp_info.avp_name, c->is_regex?"REGEX":"", c->s); 75 74 break; 76 75 77 76 default: 78 fd_log_debug("invalid (%d)!", c->type); 79 } 80 fd_log_debug("\n"); 77 fd_log_debug(" Criteria: invalid (%d)!", c->type); 78 } 81 79 } 82 80 for (li = r->targets.next; li != &r->targets; li = li->next) { 83 81 struct ard_target * t = li->o; 84 fd_log_debug(" Redirect to: '%s' \n", t->s);82 fd_log_debug(" Redirect to: '%s'", t->s); 85 83 } 86 84 }
Note: See TracChangeset
for help on using the changeset viewer.