Relax computation of appid 42/23642/1 8.99.5 icefish/8.99.5 icefish_8.99.5
authorJosé Bollo <jose.bollo@iot.bzh>
Fri, 24 Jan 2020 16:29:41 +0000 (17:29 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Fri, 24 Jan 2020 16:29:41 +0000 (17:29 +0100)
The returned appid is now either the part up to
the first @ or the entire string if no @ is present.

This evolution is needed to able the removal
of handling different versions.

Bug-AGL: SPEC-2538

Change-Id: Ibe8cfbb60333702ba33d59d3e89f33688d2a0f51
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/hs-appinfo.cpp

index 6b22265..9ccd660 100644 (file)
@@ -418,12 +418,7 @@ std::string HS_AppInfo::id2appid(const std::string &id) const
 {
     std::string appid;
     std::size_t pos = id.find("@");
-    if(pos != std::string::npos) {
-        appid = id.substr(0,pos);
-    }
-    else {
-        AFB_WARNING("input id error.");
-    }
+    appid = id.substr(0,pos);
     return appid;
 }