Changeset 1396:188c82b6690b in freeDiameter for libfdcore/fdd.y
- Timestamp:
- Nov 15, 2019, 7:38:30 PM (4 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/fdd.y
r1326 r1396 110 110 %token LISTENON 111 111 %token THRPERSRV 112 %token PROCESSINGPEERSPATTERN 113 %token PROCESSINGPEERSMINIMUM 112 114 %token TCTIMER 113 115 %token TWTIMER … … 142 144 | conffile listenon 143 145 | conffile thrpersrv 146 | conffile processingpeerspattern 147 | conffile processingpeersminimum 144 148 | conffile norelay 145 149 | conffile appservthreads … … 250 254 { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); 251 255 conf->cnf_thr_srv = $3; 256 } 257 ; 258 259 processingpeerspattern: PROCESSINGPEERSPATTERN '=' QSTRING ';' 260 { 261 char *pattern = $3; 262 int err; 263 CHECK_FCT_DO( err=regcomp(&conf->cnf_processing_peers_pattern_regex, pattern, REG_EXTENDED | REG_NOSUB), 264 { 265 char * buf; 266 size_t bl; 267 268 /* Error while compiling the regex */ 269 TRACE_DEBUG(INFO, "error while compiling the regular expression '%s':", pattern); 270 271 /* Get the error message size */ 272 bl = regerror(err, &conf->cnf_processing_peers_pattern_regex, NULL, 0); 273 274 /* Alloc the buffer for error message */ 275 CHECK_MALLOC( buf = malloc(bl) ); 276 277 /* Get the error message content */ 278 regerror(err, &conf->cnf_processing_peers_pattern_regex, buf, bl); 279 TRACE_DEBUG(INFO, "\t%s", buf); 280 281 /* Free the buffer, return the error */ 282 free(buf); 283 284 yyerror (&yylloc, conf, "Invalid regular expression in ProcessingPeersPattern"); 285 YYERROR; 286 } ); 287 } 288 ; 289 290 processingpeersminimum: PROCESSINGPEERSMINIMUM '=' INTEGER ';' 291 { 292 CHECK_PARAMS_DO( ($3 >= 0), 293 { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); 294 conf->cnf_processing_peers_minimum = $3; 252 295 } 253 296 ;
Note: See TracChangeset
for help on using the changeset viewer.