Better error handling in parser_register_cmd()
authorlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 17 May 2011 09:49:37 +0000 (09:49 +0000)
committerlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Tue, 17 May 2011 09:49:37 +0000 (09:49 +0000)
commit332a7970140d2af1b233d29c0316f51a6a54a637
tree1885f3719fb33252385ee5d8b3e832ae2eaccbd4
parentab4267aa3edebd888661683ce954c1ca71e4542f
Better error handling in parser_register_cmd()

The parser_register_cmd() function does not return any error in case the
hashtable used for storing the commands is full, a condition that is
hard to debug.

This patch modifies the function prototype to return success or failure
and changes the REGISTER_CMD macro to detect the error.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4900 38d2e660-2303-0410-9eaa-f027e97ec537
bertos/mware/parser.c
bertos/mware/parser.h