Browse code

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

Jan Janak authored on 22/11/2006 23:57:47
Showing 2 changed files
... ...
@@ -38,7 +38,7 @@ static str did_name = STR_STATIC_INIT(AVP_DID);
38 38
 /*
39 39
  * Set From UID
40 40
  */
41
-void set_from_uid(str* uid)
41
+int set_from_uid(str* uid)
42 42
 {
43 43
 	struct search_state s;
44 44
 	int_str val, name;
... ...
@@ -52,7 +52,7 @@ void set_from_uid(str* uid)
52 52
 	}
53 53
 
54 54
 	val.s = *uid;
55
-	add_avp(AVP_CLASS_USER | AVP_TRACK_FROM | AVP_NAME_STR | AVP_VAL_STR, name, val);
55
+	return add_avp(AVP_CLASS_USER | AVP_TRACK_FROM | AVP_NAME_STR | AVP_VAL_STR, name, val);
56 56
 }
57 57
 
58 58
 
... ...
@@ -122,7 +122,7 @@ int get_from_uid(str* uid, struct sip_msg* msg)
122 122
 /*
123 123
  * Set To UID
124 124
  */
125
-void set_to_uid(str* uid)
125
+int set_to_uid(str* uid)
126 126
 {
127 127
 	struct search_state s;
128 128
 	int_str val, name;
... ...
@@ -136,7 +136,7 @@ void set_to_uid(str* uid)
136 136
 	}
137 137
 
138 138
 	val.s = *uid;
139
-	add_avp(AVP_CLASS_USER | AVP_TRACK_TO | AVP_NAME_STR | AVP_VAL_STR, name, val);
139
+	return add_avp(AVP_CLASS_USER | AVP_TRACK_TO | AVP_NAME_STR | AVP_VAL_STR, name, val);
140 140
 }
141 141
 
142 142
 
... ...
@@ -37,7 +37,7 @@
37 37
 /*
38 38
  * Set From UID
39 39
  */
40
-void set_from_uid(str* uid);
40
+int set_from_uid(str* uid);
41 41
 
42 42
 
43 43
 /*
... ...
@@ -48,7 +48,7 @@ int get_from_uid(str* uid, struct sip_msg* msg);
48 48
 /*
49 49
  * Set To UID
50 50
  */
51
-void set_to_uid(str* uid);
51
+int set_to_uid(str* uid);
52 52
 
53 53
 
54 54
 /*