Skip to content
Snippets Groups Projects
Commit 8e3c7a40 authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

Cleanup

parent ae1e6f43
No related branches found
No related tags found
No related merge requests found
...@@ -121,23 +121,27 @@ func sessionInitialization() { ...@@ -121,23 +121,27 @@ func sessionInitialization() {
// Register a new user if requested // Register a new user if requested
if register { if register {
regCode := "AAAA" // FIXME: Need to pass in registration code regCode := "AAAA" // FIXME: Need to pass in registration code
fmt.Printf("Attempting to register with code %s...\n", regCode) fmt.Printf("Attempting to register with code %s...\n", regCode)
uid, err = bindings.Register(regCode, registrationAddr, uid, err = bindings.Register(regCode, registrationAddr,
strings.Join(gwAddresses, ","), mint) strings.Join(gwAddresses, ","), mint)
if err != nil { if err != nil {
fmt.Printf("Could Not Register User: %s\n", err.Error()) fmt.Printf("Could Not Register User: %s\n", err.Error())
return return
} }
fmt.Printf("Successfully registered user %v!\n", uid) fmt.Printf("Successfully registered user %v!\n", uid)
}
// Log the user in, for now using the first gateway specified } else {
if !register {
uid = id.NewUserFromUint(userId, nil).Bytes() uid = id.NewUserFromUint(userId, nil).Bytes()
} }
_, err = bindings.Login(uid[:], gwAddresses[0], "")
// Log the user in, for now using the first gateway specified
_, err = bindings.Login(uid[:], gwAddresses[0], "")
if err != nil { if err != nil {
fmt.Printf("Could Not Log In: %s\n", err) fmt.Printf("Could Not Log In: %s\n", err)
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment