Module: sip-router Branch: master Commit: 537ce843fd6cc59e022511f3c16c15a92a26aca1 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=537ce843...
Author: Jan Janak jan@iptel.org Committer: Jan Janak jan@iptel.org Date: Sun Mar 15 17:00:06 2009 +0100
Export parse_phostport function to modules.
Function parse_phostport was originally defined static in file.c, some of kamailio modules use the function and so we re-define it as public and add a declaration to header file socket_info.h
---
main.c | 4 ++-- socket_info.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c index aabaa7b..868572f 100644 --- a/main.c +++ b/main.c @@ -958,8 +958,8 @@ error: * returns fills proto, port, host and returns list of addresses on success * (pkg malloc'ed) and 0 on failure */ -static struct name_lst* parse_phostport(char* s, char** host, int* hlen, - int* port, int* proto) +struct name_lst* parse_phostport(char* s, char** host, int* hlen, + int* port, int* proto) { char* first; /* first ':' occurrence */ char* second; /* second ':' occurrence */ diff --git a/socket_info.h b/socket_info.h index 627e3db..ebe051a 100644 --- a/socket_info.h +++ b/socket_info.h @@ -90,6 +90,9 @@ struct socket_info* find_si(struct ip_addr* ip, unsigned short port,
struct socket_info** get_sock_info_list(unsigned short proto);
+struct name_lst* parse_phostport(char* s, char** host, int* hlen, + int* port, int* proto); + /* helper function: * returns next protocol, if the last one is reached return 0 * useful for cycling on the supported protocols