diff options
Diffstat (limited to 'src/modules/context/libkvicontext.cpp')
| -rw-r--r-- | src/modules/context/libkvicontext.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/modules/context/libkvicontext.cpp b/src/modules/context/libkvicontext.cpp index 163e4e86b..ef575d681 100644 --- a/src/modules/context/libkvicontext.cpp +++ b/src/modules/context/libkvicontext.cpp @@ -655,7 +655,7 @@ static bool context_kvs_fnc_getSSLCertInfo(KviKvsModuleFunctionCall * c) QString szQuery; QString szType; QString szParam1; - bool bRemote = true; + bool bRemote; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("query", KVS_PT_STRING, 0, szQuery) @@ -689,16 +689,17 @@ static bool context_kvs_fnc_getSSLCertInfo(KviKvsModuleFunctionCall * c) { bRemote = false; } + else if(szType.compare("remote") == 0 || szType.isEmpty()) + { + bRemote = true; + } else { - // already defaults to true, we only catch the error condition - if(szType.compare("remote") != 0) - { - c->warning(__tr2qs("You specified a bad string for the parameter \"type\"")); - c->returnValue()->setString(""); - return true; - } + c->warning(__tr2qs("You specified a bad string for the parameter \"type\"")); + c->returnValue()->setString(""); + return true; } + //context is never null, connection can be null if(!pConsole->context()->connection()) { |
