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() {
// Register a new user if requested
if register {
regCode := "AAAA" // FIXME: Need to pass in registration code
fmt.Printf("Attempting to register with code %s...\n", regCode)
uid, err = bindings.Register(regCode, registrationAddr,
strings.Join(gwAddresses, ","), mint)
if err != nil {
fmt.Printf("Could Not Register User: %s\n", err.Error())
return
}
fmt.Printf("Successfully registered user %v!\n", uid)
}
// Log the user in, for now using the first gateway specified
if !register {
} else {
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 {
fmt.Printf("Could Not Log In: %s\n", err)
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment