[OpenSIPS-Devel] Why "opensipsctl fifo dr_reload" returns 0 even if it fails?
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Mon Oct 19 19:19:10 CEST 2009
Iñaki Baz Castillo wrote:
> El Lunes, 19 de Octubre de 2009, Bogdan-Andrei Iancu escribió:
>
>>> Yes, the only issue I see is that MI commands says nothing so the only
>>> way to realize of it is by inspecting hte logs. Am I wrong?
>>>
>> yes, right now there is no way to make a difference between a complete
>> successful load and a partial load (with skipped rules or gateways).
>>
>> Unfortunately the success code is only one ( 0 ), so we cannot play with
>> multiple codes. But what can be done is to add some extra message in the
>> command output to indicate if some data was discarded or not.
>>
>
> Perhaps MI FIFO cannot be very powerful as it relies on Bash return codes.
> Using MI XMLRPC the real status code is 200, 500, 404... however it doens't
> provide too much information.
>
> Perhaps a new protocol would be useful? I imagine a reply containing status
> code, warning lines, error lines... in a standar and parseable way.
>
we can return warning (etc) even with the all current MI transport
implementations - actually we can add whatever text to the output (like
warning logs).
But maybe extending the MI protocol, to something like you suggested:
code
warnings / errors
output
will make sense.
Regards,
Bogdan
More information about the Devel
mailing list