Skip to content

Commit ce1ff97

Browse files
authored
Merge branch 'main' into mcp_server
2 parents 25b6812 + d445135 commit ce1ff97

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

third_party/libsuseconnect/libsuseconnect.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func announce_system(clientParams, distroTarget *C.char) *C.char {
6868
opts := loadConfig(C.GoString(clientParams))
6969
api := connect.NewWrappedAPI(opts)
7070

71-
if err := connect.Register(api, opts); err != nil {
71+
if err := api.Register(opts.Token, opts.InstanceDataFile); err != nil {
7272
return C.CString(errorToJSON(err))
7373
}
7474

@@ -77,7 +77,14 @@ func announce_system(clientParams, distroTarget *C.char) *C.char {
7777
return C.CString(errorToJSON(err))
7878
}
7979

80-
jsn, _ := json.Marshal(&creds)
80+
login := creds.Username
81+
password := creds.Password
82+
83+
var res struct {
84+
Credentials []string `json:"credentials"`
85+
}
86+
res.Credentials = []string{login, password, ""}
87+
jsn, _ := json.Marshal(&res)
8188
return C.CString(string(jsn))
8289
}
8390

0 commit comments

Comments
 (0)