Browse Source

registrar: do not return 0 in some cases of failure for save()

Daniel-Constantin Mierla 7 năm trước cách đây
mục cha
commit
9e5820f0c9
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      src/modules/registrar/save.c

+ 3 - 3
src/modules/registrar/save.c

@@ -1008,9 +1008,9 @@ error:
 	if (is_route_type(REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) )
 	if (is_route_type(REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) )
 		reg_send_reply(_m);
 		reg_send_reply(_m);
     if (R_TOO_MANY == rerrno)
     if (R_TOO_MANY == rerrno)
-	    return -2; 
+	    return -2;
 	/* for all other */
 	/* for all other */
-	return 0;
+	return -1;
 }
 }
 
 
 /* Return values:
 /* Return values:
@@ -1018,7 +1018,7 @@ error:
 	-2 Error in unregistering user
 	-2 Error in unregistering user
 	-3 Contacts for AOR not found
 	-3 Contacts for AOR not found
 */
 */
-	
+
 int unregister(struct sip_msg* _m, udomain_t* _d, str* _uri, str *_ruid)
 int unregister(struct sip_msg* _m, udomain_t* _d, str* _uri, str *_ruid)
 {
 {
 	str aor = {0, 0};
 	str aor = {0, 0};