Sfoglia il codice sorgente

- 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 22 anni fa
parent
commit
257181a026

+ 1 - 1
modules/tm/dlg.c

@@ -785,7 +785,7 @@ int dlg_request_uas(dlg_t* _d, struct sip_msg* _m)
 		LOG(L_ERR, "dlg_request_uas(): Error while parsing headers\n");
 		LOG(L_ERR, "dlg_request_uas(): Error while parsing headers\n");
 		return -2;
 		return -2;
 	}
 	}
-	if (get_cseq_value(_m, &cseq) < 0) return -3;
+	if (get_cseq_value(_m, (unsigned int*)&cseq) < 0) return -3;
 	if (_d->rem_seq.is_set && (cseq <= _d->rem_seq.value)) return 0;
 	if (_d->rem_seq.is_set && (cseq <= _d->rem_seq.value)) return 0;
 
 
 	     /* Neither out of order nor retransmission -> update */
 	     /* Neither out of order nor retransmission -> update */

+ 0 - 1
modules/tm/lock.c

@@ -241,7 +241,6 @@ int init_cell_lock( struct cell *cell )
 {
 {
 #ifdef GEN_LOCK_T_PREFERED
 #ifdef GEN_LOCK_T_PREFERED
 	lock_init(&cell->reply_mutex);
 	lock_init(&cell->reply_mutex);
-	return 0;
 #else
 #else
 	cell->reply_mutex.semaphore_set=reply_semaphore;
 	cell->reply_mutex.semaphore_set=reply_semaphore;
 	cell->reply_mutex.semaphore_index = cell->hash_index % sem_nr;
 	cell->reply_mutex.semaphore_index = cell->hash_index % sem_nr;

+ 3 - 3
modules/tm/t_funcs.c

@@ -231,8 +231,8 @@ int t_relay_to( struct sip_msg  *p_msg , struct proxy_l *proxy, int proto,
 	if ( p_msg->REQ_METHOD==METHOD_ACK) {
 	if ( p_msg->REQ_METHOD==METHOD_ACK) {
 		DBG( "SER: forwarding ACK  statelessly \n");
 		DBG( "SER: forwarding ACK  statelessly \n");
 		if (proxy==0) {
 		if (proxy==0) {
-			uri = &GET_RURI(p_msg);
-			proxy=uri2proxy(&GET_NEXT_HOP(p_msg), proto);
+			uri = GET_RURI(p_msg);
+			proxy=uri2proxy(GET_NEXT_HOP(p_msg), proto);
 			if (proxy==0) {
 			if (proxy==0) {
 					ret=E_BAD_ADDRESS;
 					ret=E_BAD_ADDRESS;
 					goto done;
 					goto done;
@@ -245,7 +245,7 @@ int t_relay_to( struct sip_msg  *p_msg , struct proxy_l *proxy, int proto,
 			init_branch_iterator();
 			init_branch_iterator();
 			while((ack_uri.s=next_branch(&ack_uri.len))) {
 			while((ack_uri.s=next_branch(&ack_uri.len))) {
 				p_msg->new_uri=ack_uri;
 				p_msg->new_uri=ack_uri;
-				proxy=uri2proxy(&GET_NEXT_HOP(p_msg), proto);
+				proxy=uri2proxy(GET_NEXT_HOP(p_msg), proto);
 				if (proxy==0) continue;
 				if (proxy==0) continue;
 				forward_request(p_msg, proxy, proxy->proto);
 				forward_request(p_msg, proxy, proxy->proto);
 				free_proxy( proxy );	
 				free_proxy( proxy );	

+ 1 - 1
modules/tm/t_fwd.c

@@ -419,7 +419,7 @@ int t_forward_nonack( struct cell *t, struct sip_msg* p_msg ,
 	*/
 	*/
 	if (first_branch==0) {
 	if (first_branch==0) {
 		try_new=1;
 		try_new=1;
-		branch_ret=add_uac( t, p_msg, &GET_RURI(p_msg), &GET_NEXT_HOP(p_msg), proxy, proto );
+		branch_ret=add_uac( t, p_msg, GET_RURI(p_msg), GET_NEXT_HOP(p_msg), proxy, proto );
 		if (branch_ret>=0) 
 		if (branch_ret>=0) 
 			added_branches |= 1<<branch_ret;
 			added_branches |= 1<<branch_ret;
 		else
 		else

+ 2 - 1
modules/tm/t_msgbuilder.c

@@ -233,7 +233,8 @@ static inline int assemble_via(str* dest, struct cell* t, struct socket_info* so
 {
 {
 	static char branch_buf[MAX_BRANCH_PARAM_LEN];
 	static char branch_buf[MAX_BRANCH_PARAM_LEN];
 	char* via;
 	char* via;
-	int len, via_len;
+	int len;
+	unsigned int via_len;
 	str branch_str;
 	str branch_str;
 
 
 	if (!t_calc_branch(t, branch, branch_buf, &len)) {
 	if (!t_calc_branch(t, branch, branch_buf, &len)) {

+ 3 - 3
parser/msg_parser.h

@@ -88,8 +88,8 @@ if (  (*tmp==(firstchar) || *tmp==((firstchar) | 32)) &&                  \
  * 3) first_line.u.request.uri
  * 3) first_line.u.request.uri
  */
  */
 #define GET_NEXT_HOP(m) \
 #define GET_NEXT_HOP(m) \
-(((m)->dst_uri.s && (m)->dst_uri.len) ? ((m)->dst_uri) : \
-(((m)->new_uri.s && (m)->new_uri.len) ? ((m)->new_uri) : ((m)->first_line.u.request.uri)))
+(((m)->dst_uri.s && (m)->dst_uri.len) ? (&(m)->dst_uri) : \
+(((m)->new_uri.s && (m)->new_uri.len) ? (&(m)->new_uri) : (&(m)->first_line.u.request.uri)))
 
 
 
 
 /*
 /*
@@ -99,7 +99,7 @@ if (  (*tmp==(firstchar) || *tmp==((firstchar) | 32)) &&                  \
  * 2) first_line.u.request.uri
  * 2) first_line.u.request.uri
  */
  */
 #define GET_RURI(m) \
 #define GET_RURI(m) \
-(((m)->new_uri.s && (m)->new_uri.len) ? ((m)->new_uri) : ((m)->first_line.u.request.uri))
+(((m)->new_uri.s && (m)->new_uri.len) ? (&(m)->new_uri) : (&(m)->first_line.u.request.uri))
 
 
 
 
 #if 0
 #if 0

+ 17 - 15
test/module_compile_status.txt

@@ -19,47 +19,49 @@ o - ok
 P - possible proto problems (tcp)
 P - possible proto problems (tcp)
 D - dead/not finished
 D - dead/not finished
 
 
-
+checked: 
+7 - 2003-05-06
+8 - 2003-05-09
 
 
 
 
 module_name       1  2  3  4  5  6  7  8
 module_name       1  2  3  4  5  6  7  8
-core                                o
-acc                                 I  o
+core                                o  
+acc                                 I  I
 auth                                o  o
 auth                                o  o
 auth_db                             o  o
 auth_db                             o  o
 auth_radius                         I  I
 auth_radius                         I  I
 cpl             P                   o  o
 cpl             P                   o  o
-cpl-c           D                   E  E
-dbtext                              o  E
+cpl-c           D                   I  I
+dbtext                              o  o
 domain                              o  o
 domain                              o  o
 enum                                o  o
 enum                                o  o
 exec                                o  o
 exec                                o  o
 ext                                 o  o
 ext                                 o  o
 extcmd                              o  o
 extcmd                              o  o
 group                               o  o
 group                               o  o
-group_radius                        I
-jabber                              W  o
-mangler                             W
+group_radius                        I  I
+jabber                              Wm W
+mangler                             W  o
 maxfwd                              o  o
 maxfwd                              o  o
 msilo                               o  o
 msilo                               o  o
 mysql                               o  o
 mysql                               o  o
-nathelper                           o
+nathelper                           o  o
 pa                                  o  o
 pa                                  o  o
-pdt                                 o
-persmissions                        o
+pdt                                 o  o
+persmissions                        o  o
 pike                                o  o
 pike                                o  o
-postgress                           I
+postgress                           I  I
 print                               o  o
 print                               o  o
 registrar                           o  o
 registrar                           o  o
 rr                                  o  o
 rr                                  o  o
 sl                                  o  o
 sl                                  o  o
 sms                                 o  o
 sms                                 o  o
-snmp      D                         I
+snmp      D                         I  I
 textops                             o  o
 textops                             o  o
 tm                                  o  o
 tm                                  o  o
 uri                                 o  o
 uri                                 o  o
-uri_radius                          I
-usrloc                              o  E
+uri_radius                          I  I
+usrloc                              o  W
 vm                                  o  o
 vm                                  o  o