Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

nil map when adding user #13

Open
amartorelli opened this issue Dec 8, 2017 · 1 comment
Open

nil map when adding user #13

amartorelli opened this issue Dec 8, 2017 · 1 comment

Comments

@amartorelli
Copy link

Hi, my goal is to serve an rtsp stream from a file. I'm not sure I understand how the whole thing works but when I start the server of course it's expecting an authentication. I did this:

authDB := auth.NewAuthDatabase("")
authDB.InsertUserRecord("admin", "password")

but I get:

panic: assignment to entry in nil map

Looking at the code

records map[string]string
seems like that map doesn't get initialised in the constructor - furthermore the variable is not exported so it's impossible to initialise it.

It'd be nice to have some example code for a basic server which serves mp4 files for instance.

Thanks

@amartorelli
Copy link
Author

This patch should fix the issue.
issue-13.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant