-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 | |||
@@ -22,34 +22,34 @@ namespace opkele { | |||
22 | # define fields_BEGINfields | 22 | # define fields_BEGINfields |
23 | # define fields_END &fields[sizeof(fields)/sizeof(*fields)] | 23 | # define fields_END &fields[sizeof(fields)/sizeof(*fields)] |
24 | typedef const struct _sreg_field *fields_iterator; | 24 | typedef const struct _sreg_field *fields_iterator; |
25 | 25 | ||
26 | bool operator==(const struct _sreg_field& fd,const string& fn) { | 26 | bool operator==(const struct _sreg_field& fd,const string& fn) { |
27 | return fd.fieldname==fn; | 27 | return fd.fieldname==fn; |
28 | } | 28 | } |
29 | 29 | ||
30 | void sreg_t::checkid_hook(params_t& p,const string& identity) { | 30 | void sreg_t::checkid_hook(params_t& p,const string& /* identity */) { |
31 | string fr, fo; | 31 | string fr, fo; |
32 | for(fields_iterator f=fields_BEGIN;f<fields_END;++f) { | 32 | for(fields_iterator f=fields_BEGIN;f<fields_END;++f) { |
33 | if(f->fieldbit&fields_required) { | 33 | if(f->fieldbit&fields_required) { |
34 | if(!fr.empty()) fr+=","; | 34 | if(!fr.empty()) fr+=","; |
35 | fr += f->fieldname; | 35 | fr += f->fieldname; |
36 | } | 36 | } |
37 | if(f->fieldbit&fields_optional) { | 37 | if(f->fieldbit&fields_optional) { |
38 | if(!fo.empty()) fo+=","; | 38 | if(!fo.empty()) fo+=","; |
39 | fo += f->fieldname; | 39 | fo += f->fieldname; |
40 | } | 40 | } |
41 | } | 41 | } |
42 | if(!fr.empty()) p["sreg.required"]=fr; | 42 | if(!fr.empty()) p["sreg.required"]=fr; |
43 | if(!fo.empty()) p["sreg.optional"]=fo; | 43 | if(!fo.empty()) p["sreg.optional"]=fo; |
44 | if(!policy_url.empty()) p["sreg.policy_url"]=policy_url; | 44 | if(!policy_url.empty()) p["sreg.policy_url"]=policy_url; |
45 | } | 45 | } |
46 | 46 | ||
47 | void sreg_t::id_res_hook(const params_t& p,const params_t& sp,const string& identity) { | 47 | void sreg_t::id_res_hook(const params_t& /* p */,const params_t& sp,const string& /* identity */) { |
48 | clear(); | 48 | clear(); |
49 | for(fields_iterator f=fields_BEGIN;f<fields_END;++f) { | 49 | for(fields_iterator f=fields_BEGIN;f<fields_END;++f) { |
50 | string fn = "sreg."; fn+=f->fieldname; | 50 | string fn = "sreg."; fn+=f->fieldname; |
51 | if(!sp.has_param(fn)) continue; | 51 | if(!sp.has_param(fn)) continue; |
52 | has_fields |= f->fieldbit; | 52 | has_fields |= f->fieldbit; |
53 | response[f->fieldbit]=sp.get_param(fn); | 53 | response[f->fieldbit]=sp.get_param(fn); |
54 | } | 54 | } |
55 | } | 55 | } |
@@ -113,12 +113,12 @@ namespace opkele { | |||
113 | if(!pout["signed"].empty()) | 113 | if(!pout["signed"].empty()) |
114 | pout["signed"] +=','; | 114 | pout["signed"] +=','; |
115 | string pn = "sreg."; pn += f->fieldname; | 115 | string pn = "sreg."; pn += f->fieldname; |
116 | pout["signed"] += pn; | 116 | pout["signed"] += pn; |
117 | pout[pn] = get_field(f->fieldbit); | 117 | pout[pn] = get_field(f->fieldbit); |
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | void sreg_t::setup_response(const params_t& pin,params_t& pout) { | 121 | void sreg_t::setup_response(const params_t& /* pin */,params_t& /* pout */) { |
122 | fields_response = (fields_required|fields_optional)&has_fields; | 122 | fields_response = (fields_required|fields_optional)&has_fields; |
123 | } | 123 | } |
124 | } | 124 | } |