Browse code

print_q -> q2str

Jan Janak authored on 27/04/2004 14:52:33
Showing 1 changed files
... ...
@@ -163,10 +163,10 @@ int append_branch(struct sip_msg* msg, char* uri, int uri_len, qvalue_t q)
163 163
  */
164 164
 char* print_dset(struct sip_msg* msg, int* len) 
165 165
 {
166
-	int cnt, i;
166
+	int cnt, i, qlen;
167 167
 	qvalue_t q;
168 168
 	str uri;
169
-	char* p;
169
+	char* p, *qbuf;
170 170
 	static char dset[MAX_REDIRECTION_LEN];
171 171
 
172 172
 	if (msg->new_uri.s) {
... ...
@@ -211,7 +211,10 @@ char* print_dset(struct sip_msg* msg, int* len)
211 211
 		if (ruri_q != Q_UNSPECIFIED) {
212 212
 			memcpy(p, Q_PARAM, Q_PARAM_LEN);
213 213
 			p += Q_PARAM_LEN;
214
-			p += print_q(p, ruri_q);
214
+
215
+			qbuf = q2str(ruri_q, &qlen);
216
+			memcpy(p, qbuf, qlen);
217
+			p += qlen;
215 218
 		}
216 219
 		i = 1;
217 220
 	} else {
... ...
@@ -234,7 +237,10 @@ char* print_dset(struct sip_msg* msg, int* len)
234 237
 		if (q != Q_UNSPECIFIED) {
235 238
 			memcpy(p, Q_PARAM, Q_PARAM_LEN);
236 239
 			p += Q_PARAM_LEN;
237
-			p += print_q(p, q);
240
+
241
+			qbuf = q2str(q, &qlen);
242
+			memcpy(p, qbuf, qlen);
243
+			p += qlen;
238 244
 		}
239 245
 		i++;
240 246
 	}