Module: kamailio
Branch: master
Commit: e34d41557e3a88cfb76571fb3f2793d85d264710
URL: 
https://github.com/kamailio/kamailio/commit/e34d41557e3a88cfb76571fb3f2793d85d264710

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2023-11-01T08:56:23+01:00

core: new code for internal processing error

---

Modified: src/core/error.c
Modified: src/core/error.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/e34d41557e3a88cfb76571fb3f2793d85d264710.diff
Patch: 
https://github.com/kamailio/kamailio/commit/e34d41557e3a88cfb76571fb3f2793d85d264710.patch

---

diff --git a/src/core/error.c b/src/core/error.c
index 0b7e3b6848d..56780222248 100644
--- a/src/core/error.c
+++ b/src/core/error.c
@@ -108,6 +108,11 @@ int err2reason_phrase(int int_error, /* current internal 
error */
                        break;
 
                case E_OUT_OF_MEM:
+                       error_txt = "Message processing error";
+                       *sip_error = 500;
+                       break;
+
+               case E_UNEXPECTED_STATE:
                        error_txt = "Internal processing error";
                        *sip_error = 500;
                        break;
@@ -116,6 +121,7 @@ int err2reason_phrase(int int_error, /* current internal 
error */
                        error_txt = "No error";
                        *sip_error = 500;
                        break;
+
                default:
                        error_txt = "I'm terribly sorry, server error occurred";
                        *sip_error = 500;
diff --git a/src/core/error.h b/src/core/error.h
index 92499e3259e..d47d759f3e5 100644
--- a/src/core/error.h
+++ b/src/core/error.h
@@ -49,7 +49,7 @@
 #define E_Q_TOO_BIG -17                /* q too big (> 1) */
 #define E_Q_DEC_MISSING -18 /* Decimal part missing */
 #define E_DROP -19                     /* Dropped in script */
-
+#define E_UNEXPECTED_STATE -20 /* Unexpected processing state */
 
 #define E_SEND -477
 /* unresolvable next-hop address */

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to [email protected]

Reply via email to