Browse Source

- set_{to,from}_uid return the return value of add_avp, patch provided by Bogdan Pintea
closes SER-121

Jan Janak 19 years ago
parent
commit
0918979863
2 changed files with 6 additions and 6 deletions
  1. 4 4
      id.c
  2. 2 2
      id.h

+ 4 - 4
id.c

@@ -38,7 +38,7 @@ static str did_name = STR_STATIC_INIT(AVP_DID);
 /*
  * Set From UID
  */
-void set_from_uid(str* uid)
+int set_from_uid(str* uid)
 {
 	struct search_state s;
 	int_str val, name;
@@ -52,7 +52,7 @@ void set_from_uid(str* uid)
 	}
 
 	val.s = *uid;
-	add_avp(AVP_CLASS_USER | AVP_TRACK_FROM | AVP_NAME_STR | AVP_VAL_STR, name, val);
+	return add_avp(AVP_CLASS_USER | AVP_TRACK_FROM | AVP_NAME_STR | AVP_VAL_STR, name, val);
 }
 
 
@@ -122,7 +122,7 @@ int get_from_uid(str* uid, struct sip_msg* msg)
 /*
  * Set To UID
  */
-void set_to_uid(str* uid)
+int set_to_uid(str* uid)
 {
 	struct search_state s;
 	int_str val, name;
@@ -136,7 +136,7 @@ void set_to_uid(str* uid)
 	}
 
 	val.s = *uid;
-	add_avp(AVP_CLASS_USER | AVP_TRACK_TO | AVP_NAME_STR | AVP_VAL_STR, name, val);
+	return add_avp(AVP_CLASS_USER | AVP_TRACK_TO | AVP_NAME_STR | AVP_VAL_STR, name, val);
 }
 
 

+ 2 - 2
id.h

@@ -37,7 +37,7 @@
 /*
  * Set From UID
  */
-void set_from_uid(str* uid);
+int set_from_uid(str* uid);
 
 
 /*
@@ -48,7 +48,7 @@ int get_from_uid(str* uid, struct sip_msg* msg);
 /*
  * Set To UID
  */
-void set_to_uid(str* uid);
+int set_to_uid(str* uid);
 
 
 /*