- /* quiet the compiler */
- VALUE_PAIR * sttype;
- VALUE_PAIR * svc;
- VALUE_PAIR * sessid;
- svc = pairfind(request->packet->vps, PW_SERVICE_TYPE);
- instance = instance;
- request = request;
- DEBUG("rlm_stg: stg_accounting()");
-
- sessid = pairfind(request->packet->vps, PW_ACCT_SESSION_ID);
- if (!sessid) {
- DEBUG("rlm_stg: stg_accounting() Acct-Session-ID undefined");
- return RLM_MODULE_FAIL;
- }
- sttype = pairfind(request->packet->vps, PW_ACCT_STATUS_TYPE);
- if (sttype) {
- DEBUG("Acct-Status-Type := %s", sttype->vp_strvalue);
- if (svc) {
- DEBUG("rlm_stg: stg_accounting() Service-Type defined as '%s'", svc->vp_strvalue);
- if (cli->Account((const char *)sttype->vp_strvalue, (const char *)request->username->vp_strvalue, (const char *)svc->vp_strvalue, (const char *)sessid->vp_strvalue)) {
- DEBUG("rlm_stg: stg_accounting error: '%s'", cli->GetError().c_str());
- return RLM_MODULE_FAIL;
- }
- } else {
- DEBUG("rlm_stg: stg_accounting() Service-Type undefined");
- if (cli->Account((const char *)sttype->vp_strvalue, (const char *)request->username->vp_strvalue, "", (const char *)sessid->vp_strvalue)) {
- DEBUG("rlm_stg: stg_accounting error: '%s'", cli->GetError().c_str());
- return RLM_MODULE_FAIL;
- }
+ /* quiet the compiler */
+ VALUE_PAIR * sttype;
+ VALUE_PAIR * svc;
+ VALUE_PAIR * sessid;
+ svc = pairfind(request->packet->vps, PW_SERVICE_TYPE);
+ instance = instance;
+ request = request;
+ DEBUG("rlm_stg: stg_accounting()");
+
+ sessid = pairfind(request->packet->vps, PW_ACCT_SESSION_ID);
+ if (!sessid) {
+ DEBUG("rlm_stg: stg_accounting() Acct-Session-ID undefined");
+ return RLM_MODULE_FAIL;
+ }
+ sttype = pairfind(request->packet->vps, PW_ACCT_STATUS_TYPE);
+ if (sttype) {
+ DEBUG("Acct-Status-Type := %s", sttype->vp_strvalue);
+ if (svc) {
+ DEBUG("rlm_stg: stg_accounting() Service-Type defined as '%s'", svc->vp_strvalue);
+ if (cli->Account((const char *)sttype->vp_strvalue, (const char *)request->username->vp_strvalue, (const char *)svc->vp_strvalue, (const char *)sessid->vp_strvalue)) {
+ DEBUG("rlm_stg: stg_accounting error: '%s'", cli->GetError().c_str());
+ return RLM_MODULE_FAIL;