Browse code

uac_redirect: use the flag for parsing contact header

- header type was used instead

Daniel-Constantin Mierla authored on 07/01/2011 22:25:10
Showing 1 changed files
... ...
@@ -211,7 +211,7 @@ static int shmcontact2dset(struct sip_msg *req, struct sip_msg *sh_rpl,
211 211
 			memcpy( &dup_rpl, sh_rpl, sizeof(struct sip_msg) );
212 212
 			dup = 2;
213 213
 			/* ok -> force the parsing of contact header */
214
-			if ( parse_headers( &dup_rpl, HDR_CONTACT_T, 0)<0 ) {
214
+			if ( parse_headers( &dup_rpl, HDR_CONTACT_F, 0)<0 ) {
215 215
 				LM_ERR("dup_rpl parse failed\n");
216 216
 				ret = -1;
217 217
 				goto restore;
... ...
@@ -224,7 +224,7 @@ static int shmcontact2dset(struct sip_msg *req, struct sip_msg *sh_rpl,
224 224
 		} else {
225 225
 			dup = 3;
226 226
 			/* force the parsing of contact header */
227
-			if ( parse_headers( sh_rpl, HDR_CONTACT_T, 0)<0 ) {
227
+			if ( parse_headers( sh_rpl, HDR_CONTACT_F, 0)<0 ) {
228 228
 				LM_ERR("sh_rpl parse failed\n");
229 229
 				ret = -1;
230 230
 				goto restore;
... ...
@@ -272,8 +272,10 @@ static int shmcontact2dset(struct sip_msg *req, struct sip_msg *sh_rpl,
272 272
 
273 273
 	/* add the sortet contacts as branches in dset and log this! */
274 274
 	for ( i=0 ; i<n ; i++ ) {
275
-		LM_DBG("adding contact <%.*s>\n", scontacts[i]->uri.len, scontacts[i]->uri.s);
276
-		if (km_append_branch( 0, &scontacts[i]->uri, 0, 0, sqvalues[i], bflags, 0)<0) {
275
+		LM_DBG("adding contact <%.*s>\n", scontacts[i]->uri.len,
276
+				scontacts[i]->uri.s);
277
+		if (km_append_branch( 0, &scontacts[i]->uri, 0, 0, sqvalues[i],
278
+					bflags, 0)<0) {
277 279
 			LM_ERR("failed to add contact to dset\n");
278 280
 		} else {
279 281
 			added++;