[manager] Return immediately on empty request. 73/10673/1
authorOssama Othman <ossama.othman@intel.com>
Mon, 7 Oct 2013 04:16:37 +0000 (21:16 -0700)
committerOssama Othman <ossama.othman@intel.com>
Tue, 8 Oct 2013 16:27:51 +0000 (09:27 -0700)
Change-Id: Ib2b2b6743d119666757c79347a15142d94053ec1
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
lib/manager.cpp

index 0b497c9..8fd64b0 100644 (file)
@@ -105,7 +105,8 @@ ivi::settings::manager::load_settings(std::string const & dir)
          * @todo I really hate catching an exception like this, but I
          *       really don't want to resort to a construct/init()
          *       style of object initialization.  Fix.
-         */std::cerr << "Error loading plugin: " << e.what() << "\n";
+         */
+        std::cerr << "Error loading plugin: " << e.what() << "\n";
       }
     }
 
@@ -130,6 +131,7 @@ ivi::settings::manager::dispatch(std::string request,
   if (request.empty()) {
     response_callback response(wsi, std::string(), std::string());
     response.send_error("Empty settings request.");
+    return;
   }
 
   smart_ptr<JsonParser> const parser(json_parser_new());