-rw-r--r-- | lib/sreg.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sreg.cc b/lib/sreg.cc index 08e66b7..60dc691 100644 --- a/lib/sreg.cc +++ b/lib/sreg.cc @@ -18,42 +18,42 @@ namespace opkele { { "country", sreg_t::field_country }, { "language", sreg_t::field_language }, { "timezone", sreg_t::field_timezone } }; # define fields_BEGIN fields # define fields_END &fields[sizeof(fields)/sizeof(*fields)] typedef const struct _sreg_field *fields_iterator; bool operator==(const struct _sreg_field& fd,const string& fn) { return fd.fieldname==fn; } - void sreg_t::checkid_hook(params_t& p,const string& identity) { + void sreg_t::checkid_hook(params_t& p,const string& /* identity */) { string fr, fo; for(fields_iterator f=fields_BEGIN;f<fields_END;++f) { if(f->fieldbit&fields_required) { if(!fr.empty()) fr+=","; fr += f->fieldname; } if(f->fieldbit&fields_optional) { if(!fo.empty()) fo+=","; fo += f->fieldname; } } if(!fr.empty()) p["sreg.required"]=fr; if(!fo.empty()) p["sreg.optional"]=fo; if(!policy_url.empty()) p["sreg.policy_url"]=policy_url; } - void sreg_t::id_res_hook(const params_t& p,const params_t& sp,const string& identity) { + void sreg_t::id_res_hook(const params_t& /* p */,const params_t& sp,const string& /* identity */) { clear(); for(fields_iterator f=fields_BEGIN;f<fields_END;++f) { string fn = "sreg."; fn+=f->fieldname; if(!sp.has_param(fn)) continue; has_fields |= f->fieldbit; response[f->fieldbit]=sp.get_param(fn); } } const string& sreg_t::get_field(fieldbit_t fb) const { response_t::const_iterator i = response.find(fb); if(i==response.end()) @@ -109,16 +109,16 @@ namespace opkele { setup_response(pin,pout); fields_response &= has_fields; for(fields_iterator f=fields_BEGIN;f<fields_END;++f) { if(!(f->fieldbit&fields_response)) continue; if(!pout["signed"].empty()) pout["signed"] +=','; string pn = "sreg."; pn += f->fieldname; pout["signed"] += pn; pout[pn] = get_field(f->fieldbit); } } - void sreg_t::setup_response(const params_t& pin,params_t& pout) { + void sreg_t::setup_response(const params_t& /* pin */,params_t& /* pout */) { fields_response = (fields_required|fields_optional)&has_fields; } } |