Need to initialize libs before calling into Xerces.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 6 May 2010 17:35:34 +0000 (17:35 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Thu, 6 May 2010 17:35:34 +0000 (17:35 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/branches/REL_2@3254 cb58f699-b61c-0410-a6fe-9272a202ed29

util/mdquery.cpp

index b8ec308..4b03df2 100644 (file)
@@ -99,21 +99,23 @@ int main(int argc,char* argv[])
         return -10;
     }
 
+    SPConfig& conf=SPConfig::getConfig();
+    conf.setFeatures(SPConfig::Metadata | SPConfig::Trust | SPConfig::OutOfProcess | SPConfig::Credentials);
+    if (!conf.init())
+        return -1;
+
     if (rname) {
         if (!protocol) {
             if (prot)
                 protocol = XMLString::transcode(prot);
         }
         if (!protocol) {
+            conf.term();
             usage();
             return -10;
         }
     }
 
-    SPConfig& conf=SPConfig::getConfig();
-    conf.setFeatures(SPConfig::Metadata | SPConfig::Trust | SPConfig::OutOfProcess | SPConfig::Credentials);
-    if (!conf.init())
-        return -1;
     if (!conf.instantiate()) {
         conf.term();
         return -2;