aboutsummaryrefslogtreecommitdiffstats
path: root/src/hs-clientmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hs-clientmanager.cpp')
-rw-r--r--src/hs-clientmanager.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/hs-clientmanager.cpp b/src/hs-clientmanager.cpp
index 1128b01..89b0ae2 100644
--- a/src/hs-clientmanager.cpp
+++ b/src/hs-clientmanager.cpp
@@ -188,7 +188,7 @@ int HS_ClientManager::handleRequest(afb_req_t request, const char *verb, const c
appid2ctxt[appid] = createClientCtxt(request, appid);
HS_Client* client = addClient(request, appid);
ret = client->handleRequest(request, "subscribe");
- HS_AppRecover::instance()->registerRecoveredApp(std::string(appid));
+ checkRegisterApp(std::string(appid));
}
else {
AFB_NOTICE("not exist session");
@@ -233,4 +233,27 @@ int HS_ClientManager::pushEvent(const char *event, struct json_object *param, st
}
return 0;
+}
+
+/**
+ * check register application
+ *
+ * #### Parameters
+ * - appid : register application's id
+ *
+ * #### Return
+ * None
+ *
+ */
+void HS_ClientManager::checkRegisterApp(const std::string &appid)
+{
+ if(HS_AppRecover::instance()->registerRecoveredApp(appid)) {
+ AFB_NOTICE("register recover application.");
+ return;
+ }
+
+ if(startup_appid == appid) {
+ startup_appid.clear();
+ pushEvent("showWindow", nullptr, appid);
+ }
} \ No newline at end of file