Module: sip-router Branch: master Commit: 35683cfb90e68719205bef377a8bedad3e633f9d URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=35683cfb...
Author: Olle E. Johansson oej@edvina.net Committer: Olle E. Johansson oej@edvina.net Date: Sun Dec 23 08:49:23 2012 +0100
Fixing compiler warnings
---
modules_k/pike/pike_rpc.c | 3 +-- modules_k/pike/pike_top.c | 2 +- modules_k/pike/pike_top.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules_k/pike/pike_rpc.c b/modules_k/pike/pike_rpc.c index 2631064..b93dcc1 100644 --- a/modules_k/pike/pike_rpc.c +++ b/modules_k/pike/pike_rpc.c @@ -138,7 +138,7 @@ static void pike_top(rpc_t *rpc, void *c)
if (options == 0) { rpc->fault(c, 500, "Bad argument. Select: ALL, HOT or WARM"); - exit; + return; } @@ -196,4 +196,3 @@ rpc_export_t pike_rpc_methods[] = { {"pike.top", pike_top, pike_top_doc, 0}, {0, 0, 0, 0} }; - diff --git a/modules_k/pike/pike_top.c b/modules_k/pike/pike_top.c index 740eea3..c3d001e 100644 --- a/modules_k/pike/pike_top.c +++ b/modules_k/pike/pike_top.c @@ -45,7 +45,7 @@ static char *print_addr(unsigned char *ip, int iplen) return pike_top_print_addr(ip, iplen, buff, sizeof(buff)); }
-int pike_top_add_entry( unsigned char *ip_addr, int addr_len, unsigned int leaf_hits[2], unsigned int hits[2], unsigned int expires, node_status_t status ) +int pike_top_add_entry( unsigned char *ip_addr, int addr_len, unsigned short leaf_hits[2], unsigned short hits[2], unsigned int expires, node_status_t status ) { struct TopListItem_t *new_item = (struct TopListItem_t *)malloc(sizeof(struct TopListItem_t)); diff --git a/modules_k/pike/pike_top.h b/modules_k/pike/pike_top.h index c12f201..c18c152 100644 --- a/modules_k/pike/pike_top.h +++ b/modules_k/pike/pike_top.h @@ -16,7 +16,7 @@ struct TopListItem_t { };
// returns 1 when OK and 0 when failed -int pike_top_add_entry( unsigned char *ip_addr, int iplen, unsigned int leaf_hits[2], unsigned int hits[2], unsigned int expires, node_status_t status ); +int pike_top_add_entry( unsigned char *ip_addr, int addr_len, unsigned short leaf_hits[2], unsigned short hits[2], unsigned int expires, node_status_t status );
struct TopListItem_t *pike_top_get_root(); void pike_top_list_clear();