pkgsrc/net/partysip/patches/patch-ac

146 lines
5.1 KiB
Text

$NetBSD: patch-ac,v 1.1 2007/10/06 00:00:01 joerg Exp $
--- src/osip_msg.c.orig 2007-10-05 22:53:12.000000000 +0000
+++ src/osip_msg.c
@@ -88,16 +88,16 @@ osip_msg_build_response (osip_message_t
goto mcubr_error_1;
pos = 0;
- while (!osip_list_eol (request->vias, pos))
+ while (!osip_list_eol (&request->vias, pos))
{
osip_via_t *via;
osip_via_t *via2;
- via = (osip_via_t *) osip_list_get (request->vias, pos);
+ via = (osip_via_t *) osip_list_get (&request->vias, pos);
i = osip_via_clone (via, &via2);
if (i != -0)
goto mcubr_error_1;
- osip_list_add (response->vias, via2, -1);
+ osip_list_add (&response->vias, via2, -1);
pos++;
}
@@ -119,7 +119,7 @@ osip_msg_build_response (osip_message_t
HASHHEX ToTag;
osip_via_t *via;
osip_generic_param_t *br;
- via = (osip_via_t *)osip_list_get(request->vias,0);
+ via = (osip_via_t *)osip_list_get(&request->vias,0);
osip_via_param_get_byname (via, "branch", &br);
if (br==NULL || br->gvalue==NULL)
{
@@ -197,14 +197,14 @@ osip_msg_build_response (osip_message_t
/* copy all record-route values */
pos=0;
- while (!osip_list_eol(request->record_routes, pos))
+ while (!osip_list_eol(&request->record_routes, pos))
{
osip_record_route_t *rr;
osip_record_route_t *rr2;
- rr = osip_list_get(request->record_routes, pos);
+ rr = osip_list_get(&request->record_routes, pos);
i = osip_record_route_clone(rr, &rr2);
if (i!=0) return -1;
- osip_list_add(response->record_routes, rr2, -1);
+ osip_list_add(&response->record_routes, rr2, -1);
pos++;
}
}
@@ -230,13 +230,13 @@ osip_msg_sfp_build_response_osip_to_forw
return -1;
/* remove top via... and send */
- via = osip_list_get (fwd->vias, 0);
+ via = osip_list_get (&fwd->vias, 0);
if (via == NULL) /* remote error: no via!! */
{
osip_message_free (fwd);
return -1;
}
- osip_list_remove (fwd->vias, 0);
+ osip_list_remove (&fwd->vias, 0);
osip_via_free (via);
if (core->banner[0]!='\0')
@@ -350,7 +350,7 @@ _osip_message_set_topheader (osip_messag
else
h->hvalue = NULL;
sip->message_property = 2;
- osip_list_add (sip->headers, h, 0);
+ osip_list_add (&sip->headers, h, 0);
return 0; /* ok */
}
@@ -427,7 +427,7 @@ osip_msg_default_build_request_osip_to_f
via_set_port (via, osip_strdup (serverport));
via_set_protocol (via, osip_strdup ("UDP"));
- osip_list_add (fwd->vias, via, 0);
+ osip_list_add (&fwd->vias, via, 0);
/* 3. Update the Max-Forwards header field */
osip_message_get_max_forwards (fwd, 0, &maxfwd);
@@ -465,7 +465,7 @@ osip_msg_default_build_request_osip_to_f
OSIP_TRACE (osip_trace
(__FILE__, __LINE__, OSIP_INFO4, NULL,
"I detect a route inserted by me, I remove it.\n"));
- osip_list_remove (fwd->routes, 0);
+ osip_list_remove (&fwd->routes, 0);
osip_route_free (route);
}
}
@@ -499,13 +499,13 @@ osip_msg_default_build_request_osip_to_f
osip_strdup (psp_config_get_element ("magicstring2")));
osip_record_route_set_url (r_route, url_of_proxy);
/* insert above all other record-route */
- osip_list_add (fwd->record_routes, r_route, 0);
+ osip_list_add (&fwd->record_routes, r_route, 0);
}
/* 9. Add a Content-Length header field if necessary */
if (fwd->content_length == NULL)
{
- if (osip_list_size (fwd->bodies) == 0)
+ if (osip_list_size (&fwd->bodies) == 0)
osip_message_set_content_length (fwd, "0");
/* else should be refused before... but I prefer to let
other deal with that */
@@ -668,7 +668,7 @@ osip_msg_modify_ack_osip_to_be_forwarded
via_set_port (via, osip_strdup (serverport));
via_set_protocol (via, osip_strdup ("UDP"));
- osip_list_add (ack->vias, via, 0);
+ osip_list_add (&ack->vias, via, 0);
/* 3. Update the Max-Forwards header field */
osip_message_get_max_forwards (ack, 0, &maxfwd);
@@ -702,7 +702,7 @@ osip_msg_modify_ack_osip_to_be_forwarded
OSIP_TRACE (osip_trace
(__FILE__, __LINE__, OSIP_INFO4, NULL,
"I detect a route inserted by me, I remove it.\n"));
- osip_list_remove (ack->routes, 0);
+ osip_list_remove (&ack->routes, 0);
osip_route_free (route);
/* in this case, we have previously requested to stay on the path.
We don't want to change that decision now, so we override
@@ -716,7 +716,7 @@ osip_msg_modify_ack_osip_to_be_forwarded
/* 9. Add a Content-Length header field if necessary */
if (ack->content_length == NULL)
{
- if (osip_list_size (ack->bodies) == 0)
+ if (osip_list_size (&ack->bodies) == 0)
osip_message_set_content_length (ack, "0");
/* else should be refused before... but I prefer to let
other deal with that */
@@ -779,7 +779,7 @@ osip_msg_build_cancel (osip_message_t **
i = osip_via_clone (via, &via2);
if (i != 0)
goto gc_error_1;
- osip_list_add (request->vias, via2, -1);
+ osip_list_add (&request->vias, via2, -1);
}
osip_message_set_content_length (request, "0");