Mercurial > hg > freeDiameter
diff extensions/app_acct/acct_db.c @ 528:1b3b9790e7cb
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;
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 03 Sep 2010 16:46:16 +0900 |
parents | 26aafbbc1640 |
children | 6af365b6f955 |
line wrap: on
line diff
--- a/extensions/app_acct/acct_db.c Wed Sep 01 16:49:02 2010 +0900 +++ b/extensions/app_acct/acct_db.c Fri Sep 03 16:46:16 2010 +0900 @@ -141,6 +141,12 @@ ADD_EXTEND("\", "); } + if (acct_config->srvnfield) { + ADD_EXTEND("\""); + ADD_ESCAPE(acct_config->srvnfield); + ADD_EXTEND("\", "); + } + for (li = emptyrecords.all.next; li != &emptyrecords.all; li = li->next) { struct acct_record_item * i = (struct acct_record_item *)(li->o); ADD_EXTEND("\""); @@ -158,6 +164,11 @@ if (acct_config->tsfield) { ADD_EXTEND("$%d, ", ++idx); } + if (acct_config->srvnfield) { + ADD_EXTEND("\""); + ADD_ESCAPE(fd_g_config->cnf_diamid); + ADD_EXTEND("\", "); + } for (li = emptyrecords.all.next; li != &emptyrecords.all; li = li->next) { struct acct_record_item * i = (struct acct_record_item *)(li->o);