Navigation


Changeset 120:d7acdc46134d in freeDiameter for extensions/test_app/ta_conf.y


Ignore:
Timestamp:
Dec 9, 2009, 5:36:38 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Renamed several extensions

File:
1 moved

Legend:

Unmodified
Added
Removed
  • extensions/test_app/ta_conf.y

    r93 r120  
    5050
    5151%{
    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... */
    5454
    5555#include <string.h>
     
    6060
    6161/* Parse the configuration file */
    62 int atst_conf_handle(char * conffile)
     62int ta_conf_handle(char * conffile)
    6363{
    64         extern FILE * atst_confin;
     64        extern FILE * ta_confin;
    6565        int ret;
    6666       
     
    6969        TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile);
    7070       
    71         atst_confin = fopen(conffile, "r");
    72         if (atst_confin == NULL) {
     71        ta_confin = fopen(conffile, "r");
     72        if (ta_confin == NULL) {
    7373                ret = errno;
    7474                fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
     
    7979        ret = yyparse(conffile);
    8080
    81         fclose(atst_confin);
     81        fclose(ta_confin);
    8282
    8383        if (ret != 0) {
     
    9090
    9191/* The Lex parser prototype */
    92 int atst_conflex(YYSTYPE *lvalp, YYLTYPE *llocp);
     92int ta_conflex(YYSTYPE *lvalp, YYLTYPE *llocp);
    9393
    9494/* Function to report the errors */
     
    152152vendor:                 VENDOR_ID '=' INTEGER ';'
    153153                        {
    154                                 atst_conf->vendor_id = $3;
     154                                ta_conf->vendor_id = $3;
    155155                        }
    156156                        ;
     
    158158appli:                  APPLI_ID '=' INTEGER ';'
    159159                        {
    160                                 atst_conf->appli_id = $3;
     160                                ta_conf->appli_id = $3;
    161161                        }
    162162                        ;
     
    164164cmd:                    CMD_ID '=' INTEGER ';'
    165165                        {
    166                                 atst_conf->cmd_id = $3;
     166                                ta_conf->cmd_id = $3;
    167167                        }
    168168                        ;
     
    170170avp:                    AVP_ID '=' INTEGER ';'
    171171                        {
    172                                 atst_conf->avp_id = $3;
     172                                ta_conf->avp_id = $3;
    173173                        }
    174174                        ;
     
    176176mode:                   MODE '=' INTEGER ';'
    177177                        {
    178                                 atst_conf->mode = $3;
     178                                ta_conf->mode = $3;
    179179                        }
    180180                        ;
     
    182182dstrealm:               DEST_REALM '=' QSTRING ';'
    183183                        {
    184                                 free(atst_conf->dest_realm);
    185                                 atst_conf->dest_realm = $3;
     184                                free(ta_conf->dest_realm);
     185                                ta_conf->dest_realm = $3;
    186186                        }
    187187                        ;
     
    189189dsthost:                DEST_HOST '=' QSTRING ';'
    190190                        {
    191                                 free(atst_conf->dest_host);
    192                                 atst_conf->dest_host = $3;
     191                                free(ta_conf->dest_host);
     192                                ta_conf->dest_host = $3;
    193193                        }
    194194                        ;
     
    196196signal:                 SIGNAL '=' INTEGER ';'
    197197                        {
    198                                 atst_conf->signal = $3;
    199                         }
    200                         ;
     198                                ta_conf->signal = $3;
     199                        }
     200                        ;
Note: See TracChangeset for help on using the changeset viewer.