Changeset 918:46f9982b7d26 in freeDiameter
- Timestamp:
- Feb 12, 2013, 10:57:32 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- libfdcore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/fdd.l
r740 r918 52 52 yylloc->first_column = yylloc->last_column + 1; \ 53 53 yylloc->last_column = yylloc->first_column + yyleng - 1; \ 54 TRACE_DEBUG (FULL,\54 TRACE_DEBUG_ERROR( \ 55 55 "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'\n", \ 56 56 yylloc->first_line, yylloc->first_column, \ … … 104 104 if (ret != 1) { 105 105 /* No matching: an error occurred */ 106 fprintf(stderr,"Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));106 TRACE_DEBUG_ERROR("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno)); 107 107 return LEX_ERROR; /* trig an error in yacc parser */ 108 108 /* Maybe we could REJECT instead of failing here? */ … … 146 146 <*>[[:alnum:]]+ | /* This rule is only useful to print a complete token in error messages */ 147 147 /* Unrecognized character */ 148 <*>. { 149 fprintf(stderr,"Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);148 <*>. { 149 TRACE_DEBUG_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext); 150 150 return LEX_ERROR; 151 151 } -
libfdcore/fdd.y
r808 r918 62 62 void yyerror (YYLTYPE *ploc, struct fd_config * conf, char const *s) 63 63 { 64 if (ploc->first_line != ploc->last_line) 65 fprintf(stderr, "%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 66 else if (ploc->first_column != ploc->last_column) 67 fprintf(stderr, "%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s); 68 else 69 fprintf(stderr, "%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s); 64 if (ploc->first_line != ploc->last_line) { 65 TRACE_DEBUG_ERROR("%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 66 } else if (ploc->first_column != ploc->last_column) { 67 TRACE_DEBUG_ERROR("%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s); 68 } else { 69 TRACE_DEBUG_ERROR("%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s); 70 } 70 71 } 71 72 … … 327 328 if (fd == NULL) { 328 329 int ret = errno; 329 TRACE_DEBUG (INFO,"Unable to open extension file %s for reading: %s\n", fname, strerror(ret));330 TRACE_DEBUG_ERROR("Unable to open extension file %s for reading: %s\n", fname, strerror(ret)); 330 331 yyerror (&yylloc, conf, "Error adding extension"); 331 332 YYERROR; … … 501 502 if (fd == NULL) { 502 503 int ret = errno; 503 TRACE_DEBUG (INFO,"Unable to open certificate file %s for reading: %s\n", $3, strerror(ret));504 TRACE_DEBUG_ERROR("Unable to open certificate file %s for reading: %s\n", $3, strerror(ret)); 504 505 yyerror (&yylloc, conf, "Error on file name"); 505 506 YYERROR; … … 509 510 if (fd == NULL) { 510 511 int ret = errno; 511 TRACE_DEBUG (INFO,"Unable to open private key file %s for reading: %s\n", $5, strerror(ret));512 TRACE_DEBUG_ERROR("Unable to open private key file %s for reading: %s\n", $5, strerror(ret)); 512 513 yyerror (&yylloc, conf, "Error on file name"); 513 514 YYERROR; … … 532 533 if (fd == NULL) { 533 534 int ret = errno; 534 TRACE_DEBUG (INFO,"Unable to open CA file %s for reading: %s\n", $3, strerror(ret));535 TRACE_DEBUG_ERROR("Unable to open CA file %s for reading: %s\n", $3, strerror(ret)); 535 536 yyerror (&yylloc, conf, "Error on file name"); 536 537 YYERROR; … … 572 573 if (fd == NULL) { 573 574 int ret = errno; 574 TRACE_DEBUG (INFO,"Unable to open CRL file %s for reading: %s\n", $3, strerror(ret));575 TRACE_DEBUG_ERROR("Unable to open CRL file %s for reading: %s\n", $3, strerror(ret)); 575 576 yyerror (&yylloc, conf, "Error on file name"); 576 577 YYERROR; … … 615 616 &err_pos), 616 617 { yyerror (&yylloc, conf, "Error setting Priority parameter."); 617 fprintf(stderr,"Error at position : %s\n", err_pos);618 TRACE_DEBUG_ERROR("Error at position : %s\n", err_pos); 618 619 YYERROR; } ); 619 620 } … … 632 633 if (fd == NULL) { 633 634 int ret = errno; 634 TRACE_DEBUG (INFO,"Unable to open DH file %s for reading: %s\n", $3, strerror(ret));635 TRACE_DEBUG_ERROR("Unable to open DH file %s for reading: %s\n", $3, strerror(ret)); 635 636 yyerror (&yylloc, conf, "Error on file name"); 636 637 YYERROR;
Note: See TracChangeset
for help on using the changeset viewer.