Browse code

- more sun cc warnings & error fixes - GET_RURI & GET_NEXT_HOP return now a str* (instead of str) -- sun cc does not like thinkgs like & ( (bloat)?foo:bar).

Andrei Pelinescu-Onciul authored on 09/05/2003 13:44:47
Showing 7 changed files
... ...
@@ -785,7 +785,7 @@ int dlg_request_uas(dlg_t* _d, struct sip_msg* _m)
785 785
 		LOG(L_ERR, "dlg_request_uas(): Error while parsing headers\n");
786 786
 		return -2;
787 787
 	}
788
-	if (get_cseq_value(_m, &cseq) < 0) return -3;
788
+	if (get_cseq_value(_m, (unsigned int*)&cseq) < 0) return -3;
789 789
 	if (_d->rem_seq.is_set && (cseq <= _d->rem_seq.value)) return 0;
790 790
 
791 791
 	     /* Neither out of order nor retransmission -> update */
... ...
@@ -241,7 +241,6 @@ int init_cell_lock( struct cell *cell )
241 241
 {
242 242
 #ifdef GEN_LOCK_T_PREFERED
243 243
 	lock_init(&cell->reply_mutex);
244
-	return 0;
245 244
 #else
246 245
 	cell->reply_mutex.semaphore_set=reply_semaphore;
247 246
 	cell->reply_mutex.semaphore_index = cell->hash_index % sem_nr;
... ...
@@ -231,8 +231,8 @@ int t_relay_to( struct sip_msg  *p_msg , struct proxy_l *proxy, int proto,
231 231
 	if ( p_msg->REQ_METHOD==METHOD_ACK) {
232 232
 		DBG( "SER: forwarding ACK  statelessly \n");
233 233
 		if (proxy==0) {
234
-			uri = &GET_RURI(p_msg);
235
-			proxy=uri2proxy(&GET_NEXT_HOP(p_msg), proto);
234
+			uri = GET_RURI(p_msg);
235
+			proxy=uri2proxy(GET_NEXT_HOP(p_msg), proto);
236 236
 			if (proxy==0) {
237 237
 					ret=E_BAD_ADDRESS;
238 238
 					goto done;
... ...
@@ -245,7 +245,7 @@ int t_relay_to( struct sip_msg  *p_msg , struct proxy_l *proxy, int proto,
245 245
 			init_branch_iterator();
246 246
 			while((ack_uri.s=next_branch(&ack_uri.len))) {
247 247
 				p_msg->new_uri=ack_uri;
248
-				proxy=uri2proxy(&GET_NEXT_HOP(p_msg), proto);
248
+				proxy=uri2proxy(GET_NEXT_HOP(p_msg), proto);
249 249
 				if (proxy==0) continue;
250 250
 				forward_request(p_msg, proxy, proxy->proto);
251 251
 				free_proxy( proxy );	
... ...
@@ -419,7 +419,7 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg ,
419 419
 	*/
420 420
 	if (first_branch==0) {
421 421
 		try_new=1;
422
-		branch_ret=add_uac( t, p_msg, &GET_RURI(p_msg), &GET_NEXT_HOP(p_msg), proxy, proto );
422
+		branch_ret=add_uac( t, p_msg, GET_RURI(p_msg), GET_NEXT_HOP(p_msg), proxy, proto );
423 423
 		if (branch_ret>=0) 
424 424
 			added_branches |= 1<<branch_ret;
425 425
 		else
... ...
@@ -233,7 +233,8 @@ static inline int assemble_via(str* dest, struct cell* t, struct socket_info* so
233 233
 {
234 234
 	static char branch_buf[MAX_BRANCH_PARAM_LEN];
235 235
 	char* via;
236
-	int len, via_len;
236
+	int len;
237
+	unsigned int via_len;
237 238
 	str branch_str;
238 239
 
239 240
 	if (!t_calc_branch(t, branch, branch_buf, &len)) {
... ...
@@ -88,8 +88,8 @@ if (  (*tmp==(firstchar) || *tmp==((firstchar) | 32)) &&                  \
88 88
  * 3) first_line.u.request.uri
89 89
  */
90 90
 #define GET_NEXT_HOP(m) \
91
-(((m)->dst_uri.s && (m)->dst_uri.len) ? ((m)->dst_uri) : \
92
-(((m)->new_uri.s && (m)->new_uri.len) ? ((m)->new_uri) : ((m)->first_line.u.request.uri)))
91
+(((m)->dst_uri.s && (m)->dst_uri.len) ? (&(m)->dst_uri) : \
92
+(((m)->new_uri.s && (m)->new_uri.len) ? (&(m)->new_uri) : (&(m)->first_line.u.request.uri)))
93 93
 
94 94
 
95 95
 /*
... ...
@@ -99,7 +99,7 @@ if (  (*tmp==(firstchar) || *tmp==((firstchar) | 32)) &&                  \
99 99
  * 2) first_line.u.request.uri
100 100
  */
101 101
 #define GET_RURI(m) \
102
-(((m)->new_uri.s && (m)->new_uri.len) ? ((m)->new_uri) : ((m)->first_line.u.request.uri))
102
+(((m)->new_uri.s && (m)->new_uri.len) ? (&(m)->new_uri) : (&(m)->first_line.u.request.uri))
103 103
 
104 104
 
105 105
 #if 0
... ...
@@ -19,47 +19,49 @@ o - ok
19 19
 P - possible proto problems (tcp)
20 20
 D - dead/not finished
21 21
 
22
-
22
+checked: 
23
+7 - 2003-05-06
24
+8 - 2003-05-09
23 25
 
24 26
 
25 27
 module_name       1  2  3  4  5  6  7  8
26
-core                                o
27
-acc                                 I  o
28
+core                                o  
29
+acc                                 I  I
28 30
 auth                                o  o
29 31
 auth_db                             o  o
30 32
 auth_radius                         I  I
31 33
 cpl             P                   o  o
32
-cpl-c           D                   E  E
33
-dbtext                              o  E
34
+cpl-c           D                   I  I
35
+dbtext                              o  o
34 36
 domain                              o  o
35 37
 enum                                o  o
36 38
 exec                                o  o
37 39
 ext                                 o  o
38 40
 extcmd                              o  o
39 41
 group                               o  o
40
-group_radius                        I
41
-jabber                              W  o
42
-mangler                             W
42
+group_radius                        I  I
43
+jabber                              Wm W
44
+mangler                             W  o
43 45
 maxfwd                              o  o
44 46
 msilo                               o  o
45 47
 mysql                               o  o
46
-nathelper                           o
48
+nathelper                           o  o
47 49
 pa                                  o  o
48
-pdt                                 o
49
-persmissions                        o
50
+pdt                                 o  o
51
+persmissions                        o  o
50 52
 pike                                o  o
51
-postgress                           I
53
+postgress                           I  I
52 54
 print                               o  o
53 55
 registrar                           o  o
54 56
 rr                                  o  o
55 57
 sl                                  o  o
56 58
 sms                                 o  o
57
-snmp      D                         I
59
+snmp      D                         I  I
58 60
 textops                             o  o
59 61
 tm                                  o  o
60 62
 uri                                 o  o
61
-uri_radius                          I
62
-usrloc                              o  E
63
+uri_radius                          I  I
64
+usrloc                              o  W
63 65
 vm                                  o  o
64 66
 
65 67