Changeset 120:d7acdc46134d in freeDiameter for extensions/test_app/ta_conf.y
- Timestamp:
- Dec 9, 2009, 5:36:38 PM (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/test_app/ta_conf.y
r93 r120 50 50 51 51 %{ 52 #include " app_test.h"53 #include " atst_conf.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */52 #include "test_app.h" 53 #include "ta_conf.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ 54 54 55 55 #include <string.h> … … 60 60 61 61 /* Parse the configuration file */ 62 int atst_conf_handle(char * conffile)62 int ta_conf_handle(char * conffile) 63 63 { 64 extern FILE * atst_confin;64 extern FILE * ta_confin; 65 65 int ret; 66 66 … … 69 69 TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); 70 70 71 atst_confin = fopen(conffile, "r");72 if ( atst_confin == NULL) {71 ta_confin = fopen(conffile, "r"); 72 if (ta_confin == NULL) { 73 73 ret = errno; 74 74 fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret)); … … 79 79 ret = yyparse(conffile); 80 80 81 fclose( atst_confin);81 fclose(ta_confin); 82 82 83 83 if (ret != 0) { … … 90 90 91 91 /* The Lex parser prototype */ 92 int atst_conflex(YYSTYPE *lvalp, YYLTYPE *llocp);92 int ta_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); 93 93 94 94 /* Function to report the errors */ … … 152 152 vendor: VENDOR_ID '=' INTEGER ';' 153 153 { 154 atst_conf->vendor_id = $3;154 ta_conf->vendor_id = $3; 155 155 } 156 156 ; … … 158 158 appli: APPLI_ID '=' INTEGER ';' 159 159 { 160 atst_conf->appli_id = $3;160 ta_conf->appli_id = $3; 161 161 } 162 162 ; … … 164 164 cmd: CMD_ID '=' INTEGER ';' 165 165 { 166 atst_conf->cmd_id = $3;166 ta_conf->cmd_id = $3; 167 167 } 168 168 ; … … 170 170 avp: AVP_ID '=' INTEGER ';' 171 171 { 172 atst_conf->avp_id = $3;172 ta_conf->avp_id = $3; 173 173 } 174 174 ; … … 176 176 mode: MODE '=' INTEGER ';' 177 177 { 178 atst_conf->mode = $3;178 ta_conf->mode = $3; 179 179 } 180 180 ; … … 182 182 dstrealm: DEST_REALM '=' QSTRING ';' 183 183 { 184 free( atst_conf->dest_realm);185 atst_conf->dest_realm = $3;184 free(ta_conf->dest_realm); 185 ta_conf->dest_realm = $3; 186 186 } 187 187 ; … … 189 189 dsthost: DEST_HOST '=' QSTRING ';' 190 190 { 191 free( atst_conf->dest_host);192 atst_conf->dest_host = $3;191 free(ta_conf->dest_host); 192 ta_conf->dest_host = $3; 193 193 } 194 194 ; … … 196 196 signal: SIGNAL '=' INTEGER ';' 197 197 { 198 atst_conf->signal = $3;199 } 200 ; 198 ta_conf->signal = $3; 199 } 200 ;
Note: See TracChangeset
for help on using the changeset viewer.