Navigation


Changeset 528:1b3b9790e7cb in freeDiameter for extensions/app_acct/acct_conf.y


Ignore:
Timestamp:
Sep 3, 2010, 4:46:16 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Add a new field in the app_acct.fdx database to receive the name of the local server.

Update your existing tables with the following SQL command:
ALTER TABLE "incoming" ADD "recorded_serv" bytea NOT NULL;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_acct/acct_conf.y

    r403 r528  
    102102        fd_log_debug("   Table name .... : '%s'\n", acct_config->tablename ?: "<null>");
    103103        fd_log_debug("   Timestamp field : '%s'\n", acct_config->tsfield ?: "<null>");
     104        fd_log_debug("   Server name fld : '%s'\n", acct_config->srvnfield ?: "<null>");
    104105        fd_log_debug(" AVPs that will be saved to the database:\n");
    105106        for (li = acct_config->avps.next; li != &acct_config->avps; li = li->next) {
     
    137138        free(acct_config->tablename);
    138139        free(acct_config->tsfield);
     140        free(acct_config->srvnfield);
    139141       
    140142        /* Done */
     
    205207%token          TABLE
    206208%token          TSFIELD
     209%token          SRVNFIELD
    207210
    208211/* Tokens and types */
     
    224227                        | conffile tableline
    225228                        | conffile tsfieldline
     229                        | conffile srvnfieldline
    226230                        | conffile errors
    227231                        {
     
    321325                        }
    322326                        ;
     327
     328srvnfieldline:          SRVNFIELD '=' QSTRING ';'
     329                        {
     330                                if (acct_config->srvnfield) {
     331                                        yyerror (&yylloc, conffile, "Duplicate entry");
     332                                        YYERROR;
     333                                }
     334                                acct_config->srvnfield = $3
     335                        }
     336                        ;
Note: See TracChangeset for help on using the changeset viewer.