concierge merge requestshttps://gitlab.hamburg.ccc.de/dooris/concierge/-/merge_requests2016-04-24T22:39:09Zhttps://gitlab.hamburg.ccc.de/dooris/concierge/-/merge_requests/5Let meep.sh be called from somewhere else.2016-04-24T22:39:09ZmadLet meep.sh be called from somewhere else.Da gibt's schon das MQTT, das kann das einfach mit machen. Weniger Zeugs in Mission-Critical Skripten!Da gibt's schon das MQTT, das kann das einfach mit machen. Weniger Zeugs in Mission-Critical Skripten!https://gitlab.hamburg.ccc.de/dooris/concierge/-/merge_requests/4 nitpicking and better c standard compliant code2014-06-10T20:45:26ZOliver 'jen' Feldt nitpicking and better c standard compliant codelet us...
...use the proper main(void) signature.
...use variable names which speak for their semantic content not their type, as types are explicitly declared.
...use perror() to signal the correct errno message upon error.
...let us...
...use the proper main(void) signature.
...use variable names which speak for their semantic content not their type, as types are explicitly declared.
...use perror() to signal the correct errno message upon error.
...move the password out of the running code, so we can change and find it easily.
...use exit() as it's a linear CLI tool, which can and should exit on certain failure/error states.
...decouple error handling from business logic. (e.g. getline() error handling and strcmp() for password check).
...not free() at the end of the program as it **is** and should **never** be necessary, since the OS **must** handle this.https://gitlab.hamburg.ccc.de/dooris/concierge/-/merge_requests/3using printf to avoid \n for pwd input message2014-06-10T13:44:26Zanthraxxusing printf to avoid \n for pwd input messagenewline after "Please enter Password: " looks strangenewline after "Please enter Password: " looks strangehttps://gitlab.hamburg.ccc.de/dooris/concierge/-/merge_requests/2memleak bugfix + cleanup + Makefile 2014-06-10T13:35:20Zanthraxxmemleak bugfix + cleanup + Makefile - memleak bugfix as free() was missing
- dont call malloc() manually (the old way getline() always called realloc() anyway because of the way the malloc() was written [did not allocate enought memory for the string])
- small minor clea...- memleak bugfix as free() was missing
- dont call malloc() manually (the old way getline() always called realloc() anyway because of the way the malloc() was written [did not allocate enought memory for the string])
- small minor cleanup
- adding simple Makefile to build door challenge