[Serusers] Re: Applying Patch to uac module

Andrei Pelinescu-Onciul andrei at iptel.org
Wed Jun 29 11:45:12 CEST 2005


On Jun 28, 2005 at 18:26, Alberto Cruz <acruz at tekbrain.com> wrote:
> Thanks Andrei. I don't know how to do this. Could you give some link to 
> a document or something like that?

Try the attached patch
(cd modules/uac; patch -p0 <uac_unstable_stable.patch).

This will make it compile (note however that I haven't tested it, you
might have some other problems).


Andrei
-------------- next part --------------
Index: auth.c
===================================================================
RCS file: /cvsroot/ser/sip_router/modules/uac/auth.c,v
retrieving revision 1.3
diff -u -r1.3 auth.c
--- auth.c	11 Jun 2005 12:24:13 -0000	1.3
+++ auth.c	29 Jun 2005 09:42:23 -0000
@@ -222,14 +222,14 @@
 		hdr_name.len, hdr_name.s);
 
 	/* search the auth hdr, but first parse them all */
-	if (parse_headers( rpl, HDR_EOH_F, 0)<0)
+	if (parse_headers( rpl, HDR_EOH, 0)<0)
 	{
 		LOG( L_ERR,"ERROR:uac:get_autenticate_hdr: failed to parse reply\n");
 		goto error;
 	}
 	for( hdr=rpl->headers ; hdr ; hdr=hdr->next )
 	{
-		if ( hdr->type!=HDR_OTHER_T )
+		if ( hdr->type!=HDR_OTHER )
 			continue;
 		if (hdr->name.len==hdr_name.len &&
 		strncasecmp(hdr->name.s,hdr_name.s, hdr_name.len)==0 )
@@ -294,7 +294,7 @@
 	req->new_uri.len=uri->len;
 
 	/* add the header */
-	if (parse_headers(req, HDR_EOH_F, 0) == -1)
+	if (parse_headers(req, HDR_EOH, 0) == -1)
 	{
 		LOG(L_ERR,"ERROR:uac:apply_urihdr_changes: failed to parse message\n");
 		goto error;
Index: from.c
===================================================================
RCS file: /cvsroot/ser/sip_router/modules/uac/from.c,v
retrieving revision 1.3
diff -u -r1.3 from.c
--- from.c	26 Mar 2005 20:10:20 -0000	1.3
+++ from.c	29 Jun 2005 09:42:23 -0000
@@ -331,7 +331,7 @@
 		}
 		ft_hdr = (struct to_body*)msg->from->parsed;
 	} else {
-		if ( !msg->to && (parse_headers(msg,HDR_TO_F,0)==-1 || !msg->to))
+		if ( !msg->to && (parse_headers(msg,HDR_TO,0)==-1 || !msg->to))
 		{
 			LOG(L_ERR,"ERROR:uac:restore_from: bad msg or missing TO hdr\n");
 			goto failed;
@@ -511,7 +511,7 @@
 			return;
 		}
 		/* parse TO in reply */
-		if (!p->rpl->to && (parse_headers(p->rpl,HDR_TO_F,0)==-1||!p->rpl->to))
+		if (!p->rpl->to && (parse_headers(p->rpl,HDR_TO,0)==-1||!p->rpl->to))
 		{
 			LOG(L_ERR,"ERROR:uac:correct_reply: failed to find/parse "
 				"TO hdr\n");


More information about the sr-users mailing list