Unidiff1 files changed, 0 insertions, 28 deletions
|
|
|
@@ -252,32 +252,4 @@ class example_rp_t : public opkele::prequeue_RP { |
252 | mutable string _nid; |
252 | mutable string _nid; |
253 | |
253 | |
254 | void set_claimed_id(const string& cid) { |
| |
255 | assert(as_id>=0); |
| |
256 | sqlite3_mem_t<char*> S = sqlite3_mprintf( |
| |
257 | "UPDATE auth_sessions" |
| |
258 | " SET as_claimed_id=%Q" |
| |
259 | " WHERE hts_id=%Q and as_id=%ld", |
| |
260 | cid.c_str(), |
| |
261 | htc.get_value().c_str(),as_id); |
| |
262 | db.exec(S); |
| |
263 | _cid = cid; |
| |
264 | } |
| |
265 | const string get_claimed_id() const { |
| |
266 | assert(as_id>=0); |
| |
267 | if(_cid.empty()) { |
| |
268 | sqlite3_mem_t<char*> S = sqlite3_mprintf( |
| |
269 | "SELECT as_claimed_id" |
| |
270 | " FROM" |
| |
271 | " auth_sessions" |
| |
272 | " WHERE" |
| |
273 | " hts_id=%Q AND as_id=%ld", |
| |
274 | htc.get_value().c_str(),as_id); |
| |
275 | sqlite3_table_t T; int nr,nc; |
| |
276 | db.get_table(S,T,&nr,&nc); |
| |
277 | assert(nr==1); assert(nc==1); |
| |
278 | _cid = T.get(1,0,nc); |
| |
279 | } |
| |
280 | return _cid; |
| |
281 | } |
| |
282 | void set_normalized_id(const string& nid) { |
254 | void set_normalized_id(const string& nid) { |
283 | assert(as_id>=0); |
255 | assert(as_id>=0); |
|