| 184 | } |
| 185 | |
| 186 | IConfigEntry* findPos(CheckStatusWrapper* status, const char* name, unsigned int n) |
| 187 | { |
| 188 | try |
| 189 | { |
| 190 | if (!confFile.hasData()) |
| 191 | { |
| 192 | return NULL; |
| 193 | } |
| 194 | |
| 195 | const ConfigFile::Parameters& p = confFile->getParameters(); |
| 196 | FB_SIZE_T pos; |
| 197 | if (!p.find(name, pos)) |
| 198 | { |
| 199 | return NULL; |
| 200 | } |
| 201 | |
| 202 | if (n + pos >= p.getCount() || p[n + pos].name != name) |
| 203 | { |
| 204 | return NULL; |
| 205 | } |
| 206 | |
| 207 | return newParam(&p[n + pos]); |
| 208 | } |
| 209 | catch (const Firebird::Exception& ex) |
| 210 | { |
| 211 | ex.stuffException(status); |
| 212 | } |
| 213 | return NULL; |
| 214 | } |
| 215 | |
| 216 | private: |
| 217 | RefPtr<ConfigFile> confFile; |
no test coverage detected