summaryrefslogtreecommitdiffstats
path: root/lib/xdsserver/sdks.go
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-22 23:05:20 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-23 00:41:58 +0100
commitf2eecfb601acc6c67fb52bf2edda93505bc44da5 (patch)
treec66957356bb6a706b5b6847254a18fdb09906e6a /lib/xdsserver/sdks.go
parent1ecdc95d837e73509243d436fcafea0920599fbe (diff)
Fixed SDKs management when running in xds VM.v1.0.0-rc2
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'lib/xdsserver/sdks.go')
-rw-r--r--lib/xdsserver/sdks.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/xdsserver/sdks.go b/lib/xdsserver/sdks.go
index 38e380d..9c10747 100644
--- a/lib/xdsserver/sdks.go
+++ b/lib/xdsserver/sdks.go
@@ -75,7 +75,8 @@ func NewSDKs(ctx *Context) (*SDKs, error) {
sdksList, err := ListCrossSDK(d, s.Log)
if err != nil {
- return &s, err
+ // allow to use XDS even if error on list
+ s.Log.Errorf("Cannot retrieve SDK list: %v", err)
}
s.LogSillyf("'%s' SDKs list: %v", d, sdksList)
@@ -309,9 +310,7 @@ func (s *SDKs) AbortInstall(id string, timeout int) (*xsapiv1.SDK, error) {
}
// Remove Used to uninstall a SDK
-func (s *SDKs) Remove(id string) (*xsapiv1.SDK, error) {
- s.mutex.Lock()
- defer s.mutex.Unlock()
+func (s *SDKs) Remove(id string, timeout int, sess *ClientSession) (*xsapiv1.SDK, error) {
cSdk, exist := s.Sdks[id]
if !exist {
@@ -323,7 +322,7 @@ func (s *SDKs) Remove(id string) (*xsapiv1.SDK, error) {
// Launch script to remove/uninstall
// (note that remove event will be generated by monitoring thread)
- if err := cSdk.Remove(); err != nil {
+ if err := cSdk.Remove(timeout, sess); err != nil {
return &cSdk.sdk, err
}