[sr-dev] git:5.5:e7b17ec5: lost: response code fix in lost_held_dereference()

Wolfgang Kampichler dev at kampichler.info
Mon May 3 12:38:39 CEST 2021


Module: kamailio
Branch: 5.5
Commit: e7b17ec5e334ac07303f341e3128645aa569069a
URL: https://github.com/kamailio/kamailio/commit/e7b17ec5e334ac07303f341e3128645aa569069a

Author: Wolfgang Kampichler <dev at kampichler.info>
Committer: Wolfgang Kampichler <dev at kampichler.info>
Date: 2021-05-03T12:33:45+02:00

lost: response code fix in lost_held_dereference()

- HELD response check returning
   200: received 200OK but nothing found (shall not happen)
   201: received 200OK and loc reference found
   202: received 200OK and value found (pidf-lo)
   203: receiced 200OK and value + reference found (pidf-lo)

(cherry picked from commit 79c6bae4af6c9c9c392b05928ca72afb14ccfbf6)

---

Modified: src/modules/lost/functions.c
Modified: src/modules/lost/response.h

---

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

---

diff --git a/src/modules/lost/functions.c b/src/modules/lost/functions.c
index c50b70bbad..711c3732bf 100644
--- a/src/modules/lost/functions.c
+++ b/src/modules/lost/functions.c
@@ -723,8 +723,8 @@ int lost_held_dereference(struct sip_msg *_m, char *_url, char *_pidf,
 
 		/* check content and set response code
 		 * + 0 nothing found: return 200
-		 * + 1 value found: return 201
-		 * + 2 reference found: return 202
+		 * + 1 reference found: return 201
+		 * + 2 value found: return 202
 		 * + 3 value and reference found: return 203
 		 */
 		ret += lost_check_HeldResponse(root);
diff --git a/src/modules/lost/response.h b/src/modules/lost/response.h
index ef509d2266..991f82ac6e 100644
--- a/src/modules/lost/response.h
+++ b/src/modules/lost/response.h
@@ -56,8 +56,8 @@
 
 #define ERRORS_NODE (const char *)"errors"
 
-#define HELD_RESPONSE_VALUE 1
-#define HELD_RESPONSE_REFERENCE 2
+#define HELD_RESPONSE_REFERENCE 1
+#define HELD_RESPONSE_VALUE 2
 
 typedef struct lost_list
 {




More information about the sr-dev mailing list