comparison 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
comparison
equal deleted inserted replaced
527:e27cb71abd4b 528:1b3b9790e7cb
139 ADD_EXTEND("\""); 139 ADD_EXTEND("\"");
140 ADD_ESCAPE(acct_config->tsfield); 140 ADD_ESCAPE(acct_config->tsfield);
141 ADD_EXTEND("\", "); 141 ADD_EXTEND("\", ");
142 } 142 }
143 143
144 if (acct_config->srvnfield) {
145 ADD_EXTEND("\"");
146 ADD_ESCAPE(acct_config->srvnfield);
147 ADD_EXTEND("\", ");
148 }
149
144 for (li = emptyrecords.all.next; li != &emptyrecords.all; li = li->next) { 150 for (li = emptyrecords.all.next; li != &emptyrecords.all; li = li->next) {
145 struct acct_record_item * i = (struct acct_record_item *)(li->o); 151 struct acct_record_item * i = (struct acct_record_item *)(li->o);
146 ADD_EXTEND("\""); 152 ADD_EXTEND("\"");
147 ADD_ESCAPE(i->param->field?:i->param->avpname); 153 ADD_ESCAPE(i->param->field?:i->param->avpname);
148 if (i->index) { 154 if (i->index) {
155 161
156 ADD_EXTEND("\") VALUES ("); 162 ADD_EXTEND("\") VALUES (");
157 163
158 if (acct_config->tsfield) { 164 if (acct_config->tsfield) {
159 ADD_EXTEND("$%d, ", ++idx); 165 ADD_EXTEND("$%d, ", ++idx);
166 }
167 if (acct_config->srvnfield) {
168 ADD_EXTEND("\"");
169 ADD_ESCAPE(fd_g_config->cnf_diamid);
170 ADD_EXTEND("\", ");
160 } 171 }
161 172
162 for (li = emptyrecords.all.next; li != &emptyrecords.all; li = li->next) { 173 for (li = emptyrecords.all.next; li != &emptyrecords.all; li = li->next) {
163 struct acct_record_item * i = (struct acct_record_item *)(li->o); 174 struct acct_record_item * i = (struct acct_record_item *)(li->o);
164 ADD_EXTEND("$%d::%s", ++idx, diam2db_types_mapping[i->param->avptype]); 175 ADD_EXTEND("$%d::%s", ++idx, diam2db_types_mapping[i->param->avptype]);
"Welcome to our mercurial repository"