| 201 | } |
| 202 | |
| 203 | bool session::get_attrs(const std::vector<string>& names, |
| 204 | std::vector<session_string>& values) |
| 205 | { |
| 206 | attrs_clear(attrs_); |
| 207 | |
| 208 | if (!get_attrs(attrs_)) { |
| 209 | return false; |
| 210 | } |
| 211 | |
| 212 | for (std::vector<string>::const_iterator cit = names.begin(); |
| 213 | cit != names.end(); ++cit) { |
| 214 | |
| 215 | std::map<string, session_string>::const_iterator cit2 |
| 216 | = attrs_.find(*cit); |
| 217 | if (cit2 != attrs_.end()) { |
| 218 | values.push_back(cit2->second); |
| 219 | } else { |
| 220 | values.push_back(""); |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | return true; |
| 225 | } |
| 226 | |
| 227 | bool session::set_ttl(time_t ttl, bool delay) |
| 228 | { |