Some checks for return codes are missing.
Examples:
Would you like to add more error handling for return values from "pthread_mutex_lock" in functions like "write_buf_to_g15" and "lcdlist_init"?
http://g15daemon.svn.sourceforge.net/viewvc/g15daemon/trunk/g15daemon/g15daemon/linked_lists.c?revision=93&view=markup
http://g15daemon.svn.sourceforge.net/viewvc/g15daemon/trunk/g15daemon/g15daemon/utility_funcs.c?revision=93&view=markup
Logged In: YES
user_id=356931
Originator: NO
You're right, of course :)
It always pays to check return values, but my understanding is that non-recursive non-errorchecking mutexes will not return until the lock has been granted to the calling thread, so the returnvalue is moot in this case. I should change the mutex type to the error-checking kind, and watch the return value. I'll add it to the top of my todo list. Of course, patches are always welcome too.
Regards
Mike
Logged In: YES
user_id=572001
Originator: YES
The return values of all Pthread functions should be checked. Otherwise, you will not notice that anything unexpected happened.
Would you like to improve the robustness of your source code?
Logged In: YES
user_id=356931
Originator: NO
This, and a number of other fixes will be done in the near future, as time allows. Improving the general stability, along with usability features of the daemon is a high priority, believe it or not :)
I appreciate your input, and thanks for the audit.
Mike