Ticket #44870

secfile_lookup_str_default() to report errors

Open Date: 2022-06-20 01:42 Last Update: 2023-01-07 02:53

Reporter:
Owner:
(None)
Type:
Status:
Open
Component:
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None

Details

My comment in https://www.hostedredmine.com/issues/720559 :

--

in principle illegal (though not causing load-time error) "obsolete_by = FALSE" definition plays a role here. 'obsolete_by' is not an boolean option.

--

The reason there's no error catched, is that obsolete_by is read with secfile_lookup_str_default(), that never returns any indication of errors - it just returns the 'default' value in these cases too.

I'd like to change it to return NULL on error (and 'default' only when there's no value given in the file being read), but that might break too many places currently relying on the return value to always be an usable string.

Ticket History (2/2 Histories)

2022-06-20 01:42 Updated by: cazfi
  • New Ticket "secfile_lookup_str_default() to report errors" created
2023-01-07 02:53 Updated by: cazfi
Comment

Interim improvement -> #46466

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login