Module: sip-router
Branch: master
Commit: 5b9c3547c42ae2273504a84538fa12f1f0a5ff17
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5b9c354…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Mon Apr 9 11:41:42 2012 +0300
modules:tm Other function declaration fixes
Functions in C musn't be declered with an empty parameter list, as (...) is assumed by
compiler, resulting in poorly optimized calls
---
modules/tm/dlg.h | 2 +-
modules/tm/h_table.h | 6 +++---
modules/tm/lock.h | 4 ++--
modules/tm/select.h | 2 +-
modules/tm/t_fifo.h | 2 +-
modules/tm/t_funcs.h | 2 +-
modules/tm/t_fwd.h | 6 +++---
modules/tm/t_hooks.h | 4 ++--
modules/tm/t_lookup.h | 12 ++++++------
modules/tm/t_reply.h | 12 ++++++------
modules/tm/t_stats.h | 12 ++++++------
11 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/modules/tm/dlg.h b/modules/tm/dlg.h
index 69452d4..5efa3b2 100644
--- a/modules/tm/dlg.h
+++ b/modules/tm/dlg.h
@@ -232,7 +232,7 @@ int register_dlg_tmcb(int type, dlg_t* dlg, transaction_cb f, void*
param);
void run_trans_dlg_callbacks(dlg_t* dlg, struct cell* trans,
struct retr_buf* rbuf);
/* cleanup on exit */
-void destroy_new_dlg_cbs();
+void destroy_new_dlg_cbs(void);
typedef int (*register_new_dlg_cb_f)(int, dialog_cb, void*);
typedef int (*register_dlg_tmcb_f)(int, dlg_t*, transaction_cb, void*);
diff --git a/modules/tm/h_table.h b/modules/tm/h_table.h
index 7ee089e..0d7f163 100644
--- a/modules/tm/h_table.h
+++ b/modules/tm/h_table.h
@@ -520,15 +520,15 @@ extern struct s_table* _tm_table; /* private internal stuff,
don't touch
void reset_kr(void);
void set_kr( enum kill_reason kr );
-enum kill_reason get_kr();
+enum kill_reason get_kr(void);
#define get_tm_table() (_tm_table)
typedef struct s_table* (*tm_get_table_f)(void);
struct s_table* tm_get_table(void);
-struct s_table* init_hash_table();
-void free_hash_table( );
+struct s_table* init_hash_table(void);
+void free_hash_table(void);
void free_cell( struct cell* dead_cell );
struct cell* build_cell( struct sip_msg* p_msg );
diff --git a/modules/tm/lock.h b/modules/tm/lock.h
index 52ccf13..ee06cab 100644
--- a/modules/tm/lock.h
+++ b/modules/tm/lock.h
@@ -62,8 +62,8 @@ typedef struct {
-int lock_initialize();
-void lock_cleanup();
+int lock_initialize(void);
+void lock_cleanup(void);
#ifdef DBG_LOCK
#define lock(_s) _lock( (_s), __FILE__, __FUNCTION__, __LINE__ )
diff --git a/modules/tm/select.h b/modules/tm/select.h
index bfdcd04..c4e7739 100644
--- a/modules/tm/select.h
+++ b/modules/tm/select.h
@@ -31,7 +31,7 @@
#define _T_SELECT_H
-int tm_init_selects();
+int tm_init_selects(void);
#endif
diff --git a/modules/tm/t_fifo.h b/modules/tm/t_fifo.h
index 9e46393..973dfd7 100644
--- a/modules/tm/t_fifo.h
+++ b/modules/tm/t_fifo.h
@@ -42,7 +42,7 @@ int fixup_t_write( void** param, int param_no);
int parse_tw_append( modparam_t type, void* val);
-int init_twrite_lines();
+int init_twrite_lines(void);
int init_twrite_sock(void);
diff --git a/modules/tm/t_funcs.h b/modules/tm/t_funcs.h
index 1cb3ca7..940e843 100644
--- a/modules/tm/t_funcs.h
+++ b/modules/tm/t_funcs.h
@@ -190,7 +190,7 @@ int fr_inv_avp2timer(unsigned int* timer);
-void tm_shutdown();
+void tm_shutdown(void);
/* function returns:
diff --git a/modules/tm/t_fwd.h b/modules/tm/t_fwd.h
index 0484c5d..34a1d2a 100644
--- a/modules/tm/t_fwd.h
+++ b/modules/tm/t_fwd.h
@@ -48,11 +48,11 @@ enum unmatched_cancel_t { UM_CANCEL_STATEFULL=0, UM_CANCEL_STATELESS,
UM_CANCEL_DROP };
typedef int (*tfwd_f)(struct sip_msg* p_msg , struct proxy_l * proxy );
-typedef int (*taddblind_f)( /*struct cell *t */ );
+typedef int (*taddblind_f)( /*struct cell *t */ void);
typedef int (*treplicate_uri_f)(struct sip_msg* p_msg , str *suri );
void t_on_branch(unsigned int go_to);
-unsigned int get_on_branch();
+unsigned int get_on_branch(void);
int t_replicate_uri(struct sip_msg *p_msg, str *suri);
int t_replicate(struct sip_msg *p_msg, struct proxy_l * proxy, int proto);
/* -- not use outside t_fwd.c for noe
@@ -70,7 +70,7 @@ int add_uac_dns_fallback( struct cell *t, struct sip_msg* msg,
struct ua_client* old_uac,
int lock_replies);
#endif
-int add_blind_uac( /* struct cell *t */ );
+int add_blind_uac(/* struct cell *t */ void);
int t_forward_nonack( struct cell *t, struct sip_msg* p_msg,
struct proxy_l * p, int proto);
int t_forward_cancel(struct sip_msg* p_msg , struct proxy_l * proxy,
diff --git a/modules/tm/t_hooks.h b/modules/tm/t_hooks.h
index 37ae4b8..9646c11 100644
--- a/modules/tm/t_hooks.h
+++ b/modules/tm/t_hooks.h
@@ -427,9 +427,9 @@ void set_early_tmcb_list(struct sip_msg *msg,
( local_req_in_tmcb_hl->first!=0 )
-int init_tmcb_lists();
+int init_tmcb_lists(void);
-void destroy_tmcb_lists();
+void destroy_tmcb_lists(void);
/* register a callback for several types of events */
diff --git a/modules/tm/t_lookup.h b/modules/tm/t_lookup.h
index 6fc1ba6..32a9e8a 100644
--- a/modules/tm/t_lookup.h
+++ b/modules/tm/t_lookup.h
@@ -54,7 +54,7 @@ extern unsigned int global_msg_id;
-void init_t();
+void init_t(void);
int init_rb( struct retr_buf *rb, struct sip_msg *msg );
typedef struct cell* (*tlookup_original_f)( struct sip_msg* p_msg );
@@ -85,8 +85,8 @@ int t_check(struct sip_msg* , int *branch );
int t_check_msg(struct sip_msg* , int *branch );
typedef struct cell * (*tgett_f)(void);
-struct cell *get_t();
-int get_t_branch();
+struct cell *get_t(void);
+int get_t_branch(void);
/* use carefully or better not at all -- current transaction is
* primarily set by lookup functions */
@@ -111,14 +111,14 @@ int t_lookup_ident(struct cell** trans, unsigned int hash_index,
unsigned int la
int t_lookup_callid(struct cell** trans, str callid, str cseq);
int t_set_fr(struct sip_msg* msg, unsigned int fr_inv_to, unsigned int fr_to );
-int t_reset_fr();
+int t_reset_fr(void);
#ifdef TM_DIFF_RT_TIMEOUT
int t_set_retr(struct sip_msg* msg, unsigned int t1_to, unsigned int t2_to);
-int t_reset_retr();
+int t_reset_retr(void);
#endif
int t_set_max_lifetime(struct sip_msg* msg, unsigned int eol_inv,
unsigned int eol_noninv);
-int t_reset_max_lifetime();
+int t_reset_max_lifetime(void);
#ifdef WITH_AS_SUPPORT
/**
diff --git a/modules/tm/t_reply.h b/modules/tm/t_reply.h
index 1fe81ad..3ebbd73 100644
--- a/modules/tm/t_reply.h
+++ b/modules/tm/t_reply.h
@@ -165,9 +165,9 @@ typedef int (*run_failure_handlers_f)(struct cell*, struct sip_msg*,
int, int);
/* Retransmits the last sent inbound reply.
* Returns -1 - error
* 1 - OK
- */
-int t_retransmit_reply( /* struct sip_msg * */ );
-
+
+ *int t_retransmit_reply(struct sip_msg *);
+*/
/* send a UAS reply
* Warning: 'buf' and 'len' should already have been build.
@@ -208,13 +208,13 @@ void on_negative_reply( struct cell* t, struct sip_msg* msg,
replies arrive
*/
void t_on_negative( unsigned int go_to );
-unsigned int get_on_negative();
+unsigned int get_on_negative(void);
void t_on_reply( unsigned int go_to );
-unsigned int get_on_reply();
+unsigned int get_on_reply(void);
int t_retransmit_reply( struct cell *t );
-void tm_init_tags();
+void tm_init_tags(void);
/* selects the branch for fwd-ing the reply */
int t_pick_branch(int inc_branch, int inc_code, struct cell *t, int *res_code);
diff --git a/modules/tm/t_stats.h b/modules/tm/t_stats.h
index 33fb9fa..1c4c094 100644
--- a/modules/tm/t_stats.h
+++ b/modules/tm/t_stats.h
@@ -72,19 +72,19 @@ union t_stats{
extern union t_stats *tm_stats;
#ifdef TM_MORE_STATS
-inline void static t_stats_created()
+inline void static t_stats_created(void)
{
/* keep it in process's piece of shmem */
tm_stats[process_no].s.t_created++;
}
-inline void static t_stats_freed()
+inline void static t_stats_freed(void)
{
/* keep it in process's piece of shmem */
tm_stats[process_no].s.t_freed++;
}
-inline void static t_stats_delayed_free()
+inline void static t_stats_delayed_free(void)
{
/* keep it in process's piece of shmem */
tm_stats[process_no].s.delayed_free++;
@@ -104,7 +104,7 @@ inline void static t_stats_new(int local)
if(local) tm_stats[process_no].s.client_transactions++;
}
-inline void static t_stats_wait()
+inline void static t_stats_wait(void)
{
/* keep it in process's piece of shmem */
tm_stats[process_no].s.waiting++;
@@ -130,7 +130,7 @@ inline static void update_reply_stats( int code ) {
}
-inline void static t_stats_replied_locally()
+inline void static t_stats_replied_locally(void)
{
tm_stats[process_no].s.replied_locally++;
}
@@ -139,7 +139,7 @@ inline void static t_stats_replied_locally()
int init_tm_stats(void);
int init_tm_stats_child(void);
-void free_tm_stats();
+void free_tm_stats(void);
void tm_rpc_stats(rpc_t* rpc, void* c);