@@ -182,7 +182,7 @@ void AcctScheduler::doAccounting(PluginContext * context)
182
182
/* *The method parses the status file for accounting information. It reads the bytes sent
183
183
* and received from the status file. It finds the values about the commonname. The method will
184
184
* only work if there are no changes in the structure of the status file.
185
- * The method is test with OpenVpn 2.0.
185
+ * The method was tested with OpenVpn 2.0.
186
186
* @param context The plugin context as an object from the class PluginContext.
187
187
* @param bytesin An int pointer for the received bytes.
188
188
* @param bytesout An int pointer for the sent bytes.
@@ -208,12 +208,13 @@ void AcctScheduler::parseStatusFile(PluginContext *context, uint64_t *bytesin, u
208
208
do
209
209
{
210
210
file.getline (line, 512 );
211
+ cerr << getTime () << " TEST: RADIUS-PLUGIN: BACKGROUND ACCT: " << line << endl;
211
212
212
213
}
213
214
while (line!=NULL && strncmp (line,key.c_str (),key.length ())!=0 && strcmp (line," ROUTING TABLE" )!=0 && file.eof ()==false );
214
215
215
216
216
- // the information is after the next delimiters
217
+ // the information is behind the next delimiters
217
218
if (line!=NULL && strncmp (line,key.c_str (),key.length ())==0 )
218
219
{
219
220
memcpy (newline, line+key.length (), strlen (line)-key.length ()+1 );
@@ -223,7 +224,7 @@ void AcctScheduler::parseStatusFile(PluginContext *context, uint64_t *bytesin, u
223
224
else
224
225
{
225
226
226
- cerr << getTime () << " RADIUS-PLUGIN: BACKGROUND ACCT: No accounting data was found for " << key <<" . \n " ;
227
+ cerr << getTime () << " RADIUS-PLUGIN: BACKGROUND ACCT: No accounting data was found for " << key << " in file " << context-> conf . getStatusFile () << endl ;
227
228
228
229
}
229
230
file.close ();
0 commit comments