Add missing event when starting SDK install 45/15745/1
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Wed, 25 Jul 2018 13:52:17 +0000 (15:52 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Wed, 25 Jul 2018 13:52:17 +0000 (15:52 +0200)
Change-Id: I32892a8ad64ed05a93aedf413a81b6e8c50c26f7
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
lib/xdsserver/sdk.go

index 68c92b4..88f662a 100644 (file)
@@ -393,6 +393,10 @@ func (s *CrossSDK) Install(file string, force bool, timeout int, args []string,
        s.sdk.Status = xsapiv1.SdkStatusInstalling
        s.sdk.LastError = ""
 
+       if err := s.events.Emit(xsapiv1.EVTSDKStateChange, s.sdk, sess.ID); err != nil {
+               s.Log.Errorf("WS Emit EVTSDKStateChange installing : %v", err)
+       }
+
        err := s.installCmd.Start()
 
        return err