[OpenSIPS-Devel] Why "opensipsctl fifo dr_reload" returns 0 even if it fails?

Iñaki Baz Castillo ibc at aliax.net
Mon Oct 19 19:11:13 CEST 2009


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.

-- 
Iñaki Baz Castillo <ibc at aliax.net>



More information about the Devel mailing list