-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentaion error when entering wrong credentials or server is down #1
Comments
Just documenting my thoughts: we'll probably add an |
I can't reproduce it. It doesn't segfault here. I added more tests to verify, but things seem fine. Edit: I just realise what your problem may be though. The API returns NULL on error, you should check the return value to see if NULL or not before using it. NULL means error. |
Hey, tasn. you're right I wasn't checking if token returned null or not, this was a problem. |
Closed in favour of #4, as there's still something that needs fixing (getting the error information), but this ticket is invalid. |
From what I understand "etesync_set_auth_token" opens the session for the API to a specific user (as token is calculated using username and password), if the server is down or the url is wrong or the token was calculated wrong (wrong credentials) it gives Segmentaion error and it shouldn't segfault.
I reproduce this just by running the example.c with wrong password and another time with server down and once with wrong url
The text was updated successfully, but these errors were encountered: