Skip to content

Commit b44416d

Browse files
author
ralfluebben
committed
*** empty log message ***
1 parent 50f901a commit b44416d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

AcctScheduler.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ void AcctScheduler::doAccounting(PluginContext * context)
182182
/**The method parses the status file for accounting information. It reads the bytes sent
183183
* and received from the status file. It finds the values about the commonname. The method will
184184
* 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.
186186
* @param context The plugin context as an object from the class PluginContext.
187187
* @param bytesin An int pointer for the received bytes.
188188
* @param bytesout An int pointer for the sent bytes.
@@ -208,12 +208,13 @@ void AcctScheduler::parseStatusFile(PluginContext *context, uint64_t *bytesin, u
208208
do
209209
{
210210
file.getline(line, 512);
211+
cerr << getTime() << "TEST: RADIUS-PLUGIN: BACKGROUND ACCT: " << line << endl;
211212

212213
}
213214
while (line!=NULL && strncmp(line,key.c_str(),key.length())!=0 && strcmp(line,"ROUTING TABLE")!=0 && file.eof()==false);
214215

215216

216-
//the information is after the next delimiters
217+
//the information is behind the next delimiters
217218
if (line!=NULL && strncmp(line,key.c_str(),key.length())==0)
218219
{
219220
memcpy(newline, line+key.length(), strlen(line)-key.length()+1);
@@ -223,7 +224,7 @@ void AcctScheduler::parseStatusFile(PluginContext *context, uint64_t *bytesin, u
223224
else
224225
{
225226

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;
227228

228229
}
229230
file.close();

ChangeLog

+2
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,7 @@ radiusplugin_2.1:
9797
- Only create the client-config file, if one of attributes for it is defined.
9898
- Add NAS port number to the session id, it's definitely unique
9999
- Acct-Session-Id added to Access-Request packet (RFC2866)
100+
101+
radiusplugin_2.1a:
100102
- Implement accounting only feature (option: accountingonly, default false)
101103
- Implement non fatal accounting (failures during accounting let the user still connect) (nonfatalaccounting)

0 commit comments

Comments
 (0)