mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
cleanup and consistency.. blah rain @ PHX fun
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7396 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -64,7 +64,6 @@ SWITCH_DECLARE(char *) switch_find_end_paren(const char *s, char open, char clos
|
||||
return (char *)e;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_size_t) switch_fd_read_line(int fd, char *buf, switch_size_t len)
|
||||
{
|
||||
char c, *p;
|
||||
@@ -133,7 +132,6 @@ SWITCH_DECLARE(char *) switch_amp_encode(char *s, char *buf, switch_size_t len)
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
static const char switch_b64_table[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
#define B64BUFFLEN 1024
|
||||
SWITCH_DECLARE(switch_status_t) switch_b64_encode(unsigned char *in, switch_size_t ilen, unsigned char *out, switch_size_t olen)
|
||||
@@ -167,7 +165,6 @@ SWITCH_DECLARE(switch_status_t) switch_b64_encode(unsigned char *in, switch_size
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_size_t) switch_b64_decode(char *in, char *out, switch_size_t olen)
|
||||
{
|
||||
|
||||
@@ -208,7 +205,6 @@ SWITCH_DECLARE(switch_size_t) switch_b64_decode(char *in, char *out, switch_size
|
||||
return ol;
|
||||
}
|
||||
|
||||
|
||||
static int write_buf(int fd, const char *buf)
|
||||
{
|
||||
|
||||
@@ -322,8 +318,6 @@ SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to, const char *fr
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (file) {
|
||||
switch_snprintf(buf, B64BUFFLEN, "\n\n--%s--\n.\n", bound);
|
||||
if (!write_buf(fd, buf))
|
||||
@@ -377,8 +371,7 @@ SWITCH_DECLARE(switch_bool_t) switch_is_lan_addr(const char *ip)
|
||||
strncmp(ip, "172.31.", 7) &&
|
||||
strncmp(ip, "192.0.2.", 8) &&
|
||||
strncmp(ip, "169.254.", 8)
|
||||
) ? SWITCH_FALSE : SWITCH_TRUE;
|
||||
|
||||
) ? SWITCH_FALSE : SWITCH_TRUE;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_bool_t) switch_ast2regex(char *pat, char *rbuf, size_t len)
|
||||
@@ -452,7 +445,6 @@ SWITCH_DECLARE(char *) switch_strip_spaces(const char *str)
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(char *) switch_separate_paren_args(char *str)
|
||||
{
|
||||
char *e, *args;
|
||||
@@ -497,7 +489,6 @@ SWITCH_DECLARE(switch_bool_t) switch_is_number(const char *str)
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_stristr(const char *instr, const char *str)
|
||||
{
|
||||
/*
|
||||
@@ -508,7 +499,6 @@ SWITCH_DECLARE(const char *) switch_stristr(const char *instr, const char *str)
|
||||
**
|
||||
** Hereby donated to public domain.
|
||||
*/
|
||||
|
||||
const char *pptr, *sptr, *start;
|
||||
|
||||
if (!str || !instr)
|
||||
@@ -539,7 +529,6 @@ SWITCH_DECLARE(const char *) switch_stristr(const char *instr, const char *str)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_find_local_ip(char *buf, int len, int family)
|
||||
{
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
@@ -574,7 +563,6 @@ SWITCH_DECLARE(switch_status_t) switch_find_local_ip(char *buf, int len, int fam
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
tmp_socket = socket(family, SOCK_DGRAM, 0);
|
||||
|
||||
@@ -671,7 +659,6 @@ SWITCH_DECLARE(switch_status_t) switch_find_local_ip(char *buf, int len, int fam
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
doh:
|
||||
if (tmp_socket > 0) {
|
||||
close(tmp_socket);
|
||||
@@ -680,10 +667,8 @@ SWITCH_DECLARE(switch_status_t) switch_find_local_ip(char *buf, int len, int fam
|
||||
#endif
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_time_t) switch_str_time(const char *in)
|
||||
{
|
||||
switch_time_exp_t tm = { 0 };
|
||||
@@ -733,7 +718,6 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(const char *in)
|
||||
}
|
||||
/* possible else with more patterns later */
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_priority_name(switch_priority_t priority)
|
||||
@@ -1213,7 +1197,6 @@ SWITCH_DECLARE(const char *) switch_cut_path(const char *in)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len)
|
||||
{
|
||||
size_t i;
|
||||
@@ -1275,7 +1258,6 @@ SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t * poll, int ms)
|
||||
return nsds;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(size_t) switch_url_encode(const char *url, char *buf, size_t len)
|
||||
{
|
||||
const char *p;
|
||||
@@ -1328,11 +1310,10 @@ SWITCH_DECLARE(char *) switch_url_decode(char *s)
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* indent-tabs-mode:nil
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
|
Reference in New Issue
Block a user