Просмотр исходного кода

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)
Wolfgang Kampichler 4 лет назад
Родитель
Сommit
e7b17ec5e3
2 измененных файлов с 4 добавлено и 4 удалено
  1. 2 2
      src/modules/lost/functions.c
  2. 2 2
      src/modules/lost/response.h

+ 2 - 2
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);

+ 2 - 2
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
 {