Browse code

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

Jan Janak authored on 15/03/2009 16:00:06
Showing 2 changed files
... ...
@@ -958,8 +958,8 @@ error:
958 958
  * returns  fills proto, port, host and returns list of addresses on success
959 959
  * (pkg malloc'ed) and 0 on failure
960 960
  */
961
-static struct name_lst* parse_phostport(char* s, char** host, int* hlen,
962
-										int* port, int* proto)
961
+struct name_lst* parse_phostport(char* s, char** host, int* hlen,
962
+								 int* port, int* proto)
963 963
 {
964 964
 	char* first; /* first ':' occurrence */
965 965
 	char* second; /* second ':' occurrence */
... ...
@@ -90,6 +90,9 @@ struct socket_info* find_si(struct ip_addr* ip, unsigned short port,
90 90
 
91 91
 struct socket_info** get_sock_info_list(unsigned short proto);
92 92
 
93
+struct name_lst* parse_phostport(char* s, char** host, int* hlen,
94
+								 int* port, int* proto);
95
+
93 96
 /* helper function:
94 97
  * returns next protocol, if the last one is reached return 0
95 98
  * useful for cycling on the supported protocols