diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Keys.cc | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Keys.cc b/src/Keys.cc index e6105aa..f25eb4a 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | //$Id: Keys.cc,v 1.33 2003/06/30 19:42:20 fluxgen Exp $ | 22 | //$Id: Keys.cc,v 1.34 2003/06/30 20:59:28 fluxgen Exp $ |
23 | 23 | ||
24 | 24 | ||
25 | #include "Keys.hh" | 25 | #include "Keys.hh" |
@@ -194,19 +194,22 @@ bool Keys::load(const char *filename) { | |||
194 | const char *str = | 194 | const char *str = |
195 | FbTk::StringUtil::strcasestr(linebuffer.c_str(), | 195 | FbTk::StringUtil::strcasestr(linebuffer.c_str(), |
196 | val[argc].c_str() + 1); // +1 to skip ':' | 196 | val[argc].c_str() + 1); // +1 to skip ':' |
197 | 197 | if (str == 0) { | |
198 | // +1 to remove the first ':' | ||
199 | last_key->m_command = CommandParser::instance().parseLine(str); | ||
200 | |||
201 | if (*last_key->m_command == 0) { | ||
202 | cerr<<"File: "<<filename<<". Error on line: "<<line<<endl; | 198 | cerr<<"File: "<<filename<<". Error on line: "<<line<<endl; |
203 | cerr<<"> "<<linebuffer<<endl; | 199 | cerr<<"> "<<linebuffer<<endl; |
204 | } else { | 200 | } else { |
205 | // Add the keychain to list | 201 | |
206 | if (!mergeTree(current_key)) | 202 | last_key->m_command = CommandParser::instance().parseLine(str); |
207 | cerr<<"Keys: Failed to merge keytree!"<<endl; | 203 | |
204 | if (*last_key->m_command == 0) { | ||
205 | cerr<<"File: "<<filename<<". Error on line: "<<line<<endl; | ||
206 | cerr<<"> "<<linebuffer<<endl; | ||
207 | } else { | ||
208 | // Add the keychain to list | ||
209 | if (!mergeTree(current_key)) | ||
210 | cerr<<"Keys: Failed to merge keytree!"<<endl; | ||
211 | } | ||
208 | } | 212 | } |
209 | |||
210 | delete current_key; | 213 | delete current_key; |
211 | current_key = 0; | 214 | current_key = 0; |
212 | last_key = 0; | 215 | last_key = 0; |