summaryrefslogtreecommitdiff
path: root/net/partysip/patches/patch-ac
blob: 2610a2f1af2e75bbcf9b32f80804ed5ccc0978ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
$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");