[OpenSER-Devel] [ openser-Bugs-1682036 ] Check return codes everywhere

SourceForge.net noreply at sourceforge.net
Mon Nov 19 11:21:49 UTC 2007


Bugs item #1682036, was opened at 2007-03-16 13:55
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1682036&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver devel
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Markus Elfring (elfring)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Check return codes everywhere

Initial Comment:
Some checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "fprintf" like in the function "daemonize" and from "close" in the function "init_unixsock_children"?
http://openser.svn.sourceforge.net/viewvc/openser/trunk/daemonize.c?revision=1782&view=markup
http://openser.svn.sourceforge.net/viewvc/openser/trunk/unixsock_server.c?revision=1782&view=markup

How do you think about to improve your software quality with exception handling?
http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1
http://cexcept.sourceforge.net/

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2007-11-19 13:21

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Markus,

Chacking is goog, but is not necessary in all the cases. If to check the
return code of a function depends on the code context. There are case where
you are not really intersted (as further processing) in the return code.

I suggest to have a more particular aproach, rather than a a global one

I made the fixes you suggested - if you find others, please report them by
opening on the tracker.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

Comment By: Markus Elfring (elfring)
Date: 2007-03-16 14:18

Message:
Logged In: YES 
user_id=572001
Originator: YES

Would you like to detect every error situation as early as possible?

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2007-03-16 14:14

Message:
Logged In: YES 
user_id=337916
Originator: NO

Better error handling is allways good, but i don't think we 
would gain much if you implement it for the function you mentioned.

Exception are good (if you use e.g. C++), and i miss them honestly. But
for C this is another case. The project you mentioned is IMHO
really unmaintained, the last update was in 2000.. And i don't know any
other well known C project that uses such a mechanism.

I think it is better to ask such general questions at the devel
mailinglist.

Henning

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1682036&group_id=139143



More information about the Devel mailing list