Hello,

Try the attached patch for preventing save() to stop your script.

In regards to the error itself, $err is not suitable for that. The idea will be to have save() returning detailed negative codes to reflect the actual internal error.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 08.02.2014 11:14, Martin Adrien wrote:
Hello,

On 07/02/2014 21:00, Bogdan-Andrei Iancu wrote:
Hello,

Not sure a bug or an undocumented feature, but save() function, in case
of internal error, is stopping the script.

Assuming we change that (to continue the script execution), you will
failure from "save()" without actually knowing the error itself. I
assume you are looking the error code/reason, right ?
That's right, the code/reason is quite useful.
But if it can not be known, maybe can I get the sip status sent by
Opensis, with $err.rcode for example.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
Regards,

Adrien Martin

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



diff --git a/modules/registrar/save.c b/modules/registrar/save.c
index c2a88fa..7e9daec 100644
--- a/modules/registrar/save.c
+++ b/modules/registrar/save.c
@@ -876,7 +876,7 @@ error:
 
 	if (forced_c) free_contacts(&forced_c);
 
-	return 0;
+	return -2;
 
 return_minus_one:
 	if (forced_c) free_contacts(&forced_c);
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to