Changeset 974:2091bf698fb1 in freeDiameter for extensions/app_radgw/rgw_conf.l
- Timestamp:
- Mar 15, 2013, 2:14:35 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/app_radgw/rgw_conf.l
r741 r974 89 89 yylval->string = strdup(yytext+1); 90 90 if (yylval->string == NULL) { 91 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));91 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 92 92 return LEX_ERROR; /* trig an error in yacc parser */ 93 93 } … … 111 111 if (ret != 1) { 112 112 /* No matching: an error occurred */ 113 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));113 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 114 114 return LEX_ERROR; /* trig an error in yacc parser */ 115 115 /* Maybe we could REJECT instead of failing here? */ … … 133 133 work = strdup(yytext); 134 134 if ( work == NULL ) { 135 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));135 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 136 136 return LEX_ERROR; /* trig an error in yacc parser */ 137 137 } … … 141 141 port++; 142 142 if (sscanf(port, "%hu]", &p) != 1) { 143 fd_log_debug("'%s' is not a valid port: %s \n", port, strerror(errno));143 fd_log_debug("'%s' is not a valid port: %s", port, strerror(errno)); 144 144 free(work); 145 145 return LEX_ERROR; /* trig an error in yacc parser */ … … 153 153 sin6 = malloc(sizeof(struct sockaddr_in6)); 154 154 if (sin6 == NULL) { 155 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));155 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 156 156 free(work); 157 157 return LEX_ERROR; /* trig an error in yacc parser */ … … 161 161 sin6->sin6_family = AF_INET6; 162 162 if (inet_pton(AF_INET6, work, &sin6->sin6_addr) != 1) { 163 fd_log_debug("'%s' is not a valid IPv6 address: %s \n", work, strerror(errno));163 fd_log_debug("'%s' is not a valid IPv6 address: %s", work, strerror(errno)); 164 164 free(work); 165 165 free(sin6); … … 173 173 sin = malloc(sizeof(struct sockaddr_in)); 174 174 if (sin == NULL) { 175 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));175 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 176 176 free(work); 177 177 return LEX_ERROR; /* trig an error in yacc parser */ … … 181 181 sin->sin_family = AF_INET; 182 182 if (inet_pton(AF_INET, work, &sin->sin_addr) != 1) { 183 fd_log_debug("'%s' is not a valid IP address: %s \n", work, strerror(errno));183 fd_log_debug("'%s' is not a valid IP address: %s", work, strerror(errno)); 184 184 free(work); 185 185 free(sin); … … 213 213 if (ret != 1) { 214 214 /* No matching: an error occurred */ 215 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));215 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 216 216 return LEX_ERROR; /* trig an error in yacc parser */ 217 217 /* Maybe we could REJECT instead of failing here? */ … … 227 227 sin = malloc(sizeof(struct sockaddr_in)); 228 228 if (sin == NULL) { 229 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));229 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 230 230 return LEX_ERROR; /* trig an error in yacc parser */ 231 231 } … … 234 234 sin->sin_family = AF_INET; 235 235 if (inet_pton(AF_INET, yytext, &sin->sin_addr) != 1) { 236 fd_log_debug("'%s' is not a valid IP address: %s \n", yytext, strerror(errno));236 fd_log_debug("'%s' is not a valid IP address: %s", yytext, strerror(errno)); 237 237 free(sin); 238 238 return LEX_ERROR; /* trig an error in yacc parser */ … … 247 247 sin6 = malloc(sizeof(struct sockaddr_in6)); 248 248 if (sin6 == NULL) { 249 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));249 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 250 250 return LEX_ERROR; /* trig an error in yacc parser */ 251 251 } … … 254 254 sin6->sin6_family = AF_INET6; 255 255 if (inet_pton(AF_INET6, yytext, &sin6->sin6_addr) != 1) { 256 fd_log_debug("'%s' is not a valid IPv6 address: %s \n", yytext, strerror(errno));256 fd_log_debug("'%s' is not a valid IPv6 address: %s", yytext, strerror(errno)); 257 257 free(sin6); 258 258 return LEX_ERROR; /* trig an error in yacc parser */ … … 271 271 /* Unrecognized character */ 272 272 <*>. { 273 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);273 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 274 274 return LEX_ERROR; 275 275 }
Note: See TracChangeset
for help on using the changeset viewer.