New380 / cubesat-space-protocol

Automatically exported from code.google.com/p/cubesat-space-protocol
0 stars 0 forks source link

General return values for errors in functions #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Some functions returns the same value for all errors (fx 
csp_transation_persist()), we will need to add more return values indicating 
the error, and not just print to stdout. 

Original issue reported on code.google.com by qua...@gmail.com on 27 Jan 2011 at 4:25

GoogleCodeExporter commented 9 years ago

Original comment by johan.de...@gmail.com on 28 Jan 2011 at 10:20

GoogleCodeExporter commented 9 years ago
Agree. In general, we need to reconsider the return values for a lot of 
functions. Returning 1 on success makes it difficult to separate errors. Maybe 
a csp_error.h should be added with suitable error codes such as CSP_ERR_NONE, 
CSP_ERR_NOMEM and so on?

Original comment by j...@satlab.org on 28 Jan 2011 at 10:21

GoogleCodeExporter commented 9 years ago
There are also some functions returning void (see csp_services.c) that should 
return int instead of simply printing errors.

Original comment by j...@satlab.org on 28 Jan 2011 at 10:27

GoogleCodeExporter commented 9 years ago
I have added csp_error.h in r344, which should be used for all new functions.

Original comment by j...@satlab.org on 18 Aug 2011 at 11:10

GoogleCodeExporter commented 9 years ago

Original comment by j...@satlab.org on 30 Sep 2011 at 11:25