Jeff Lenk
76b093a098
fix trivial windows compiler warning for vs2010
2014-09-05 22:43:52 -05:00
Travis Cross
5fadb52758
Fix build on gcc-4.9
...
GCC doesn't like when variables that are set but never used.
2014-09-04 03:43:36 +00:00
Seven Du
f0b9407cca
add http utils
2014-09-04 08:43:51 +08:00
Travis Cross
e2d67d4ead
Remove dead assignment
2014-08-22 00:58:53 +00:00
Travis Cross
b5a87aea7f
Avoid using undefined memory in `switch_fulldate_cmp`
...
The `switch_split_date` and `switch_split_time` functions only set as
many variables as they believe exist values in the input string.
Since we didn't have defaults assigned we would read undefined stack
memory if the input string didn't contain e.g. an hour.
With this commit, we use 1970 if no year is present, January if no
month is present, the first day of the month if none is given, and
zero for each of a missing hour, minute, or second.
2014-08-22 00:47:22 +00:00
Travis Cross
bf42dd65f1
Refactor `switch_fulldate_cmp`
...
We're moving the variable declarations down to the smallest possible
scope (a good idea in general) so we can address the use of undefined
memory by the function in a later commit.
2014-08-22 00:43:27 +00:00
William King
b1f382c67e
CID 1229134: fix small memory leak
2014-07-29 21:42:31 -07:00
Jeff Lenk
86ef5d2668
trivial compiler fix
2014-07-27 17:23:51 -05:00
Anthony Minessale
4f1b09a3ca
add switch_socket_waitlist for waiting on multiple sockets and abstract it to poll and select so windows can use it too
2014-07-25 00:23:08 +05:00
Anthony Minessale
a2921e269c
update verto with some fixes and enhancements with reconnection
2014-07-18 01:04:04 +05:00
Mike Jerris
6dca24bb2a
Merge pull request #5 in FS/freeswitch from ~KATHLEEN.KING/freeswitch-fork:clang-warnings-werror to master
...
* commit '1affff9db4aaa29ab66f9f5db76f575eeabd86b5':
Fixed a clang-3.5 missing-prototype warning and added doxygen documentation for switch_channel_set_presence_data_vals. #doxygen
Fixed dead code.
Fixed trucation of value warning.
Removed a useless called to abs.
Removed an autological-pointer-compare from src/switch_utils.c.
Fixed trucation of value warning.
2014-07-14 17:38:21 -05:00
Brian West
8951d26f8c
FS-6626 fix winter DST issue
2014-07-09 07:58:11 -05:00
Kathleen King
24e5c13283
Removed an autological-pointer-compare from src/switch_utils.c.
...
Building with Clang 3.5 gave the following warning: error: comparison
of array 'iface_out.sin6_addr.__in6_u.__u6_addr8' equal to a null
pointer is always false [-Werror,-Wtautological-pointer-compare]
This is a problem because as it is written the check will never be
true. A pointer to a structure within a structure will never be null. The
intention was either to null check the pointer or to check if the IP
address itself was not zero.
From context in the code this appeared to be a pointer null check so I
removed it.
2014-07-03 12:12:22 -07:00
Travis Cross
7cde2adcb7
Fix minor edge case in switch_split_user_domain
...
If the input started with 'sip:sips:' it would have been incorrectly
parsed.
2014-03-06 06:03:27 +00:00
Travis Cross
164d6a7bf5
Optimize switch_split_user_domain a bit
...
This avoids searching the string repeatedly with strchr.
2014-03-02 09:43:14 +00:00
Travis Cross
5aab272bb3
Refactor and fix edge cases in switch_split_user_domain
...
We were incorrectly parsing usernames and domains starting with "sip"
if there was no sip: or sips: scheme in the string.
We were also incorrectly parsing usernames containing a colon even if
a scheme was given.
This also refactors the function for hopefully greater clarity.
2014-03-02 09:20:59 +00:00
Travis Cross
b22aa39e66
Fix switch_split_user_domain handling of sips: URLs
...
In commit 7efeabbd88
Anthony fixed the
handling of sip:example.com and sips:example.com URLs, however he
introduced a regression causing URLs starting with 's' to be parsed
incorrectly.
In commit 7d2456ea27
Brian fixed the
regression, but introduced a regression causing sips:example.com URLs
to be handled incorrectly.
2014-03-02 08:11:11 +00:00
Brian West
7d2456ea27
FS-6250 fix regression from 7efeabbd88
, don't discrimiate against people that have s as the first character in their user names
2014-02-24 05:52:57 -06:00
Ken Rice
6e7d5d0897
update copyright header for 2014
2014-02-12 12:08:56 -06:00
Anthony Minessale
7efeabbd88
fix switch_split_user_domain to parse sip:foo.com properly
2014-02-12 23:11:11 +05:00
Peter Olsson
084e245085
Lots of trivial tweaks to minimize compiler warnings, especially on 64-bit platform: Added missing type casts, changed types, added missing NULL checks.
2014-01-22 22:30:23 +01:00
Anthony Minessale
bb9adff511
rework media code
2013-11-08 03:48:00 +05:00
Anthony Minessale
2c6427ccb7
FS-5708 --resolve
2013-08-19 23:48:17 +05:00
Ken Rice
1facd34bde
Revert "FS-5708 ... problems with build on this one
...
This reverts commit c21f65ac55
.
2013-08-16 17:53:12 -05:00
Anthony Minessale
8e45f23d02
FS-5709 --resolve
2013-08-17 02:16:28 +05:00
Anthony Minessale
c21f65ac55
FS-5708 --resolve
2013-08-17 02:13:49 +05:00
Nathan Neulinger
32adc789f6
make noexpandtab explicit in all vim modelines other than xml files
2013-06-25 11:50:17 -05:00
Nathan Neulinger
e74bba08c2
FS-5449: apply correct quoting, got older version of patch accidentally
2013-05-31 16:31:27 -05:00
Nathan Neulinger
ac0ed44b96
FS-5449: --resolve add a mod_commands function to use the shell escape function and update the existing function to use correct escaping
...
adds a pool based implementation of the switch_util_quote_shell_arg function and changes existing function to be a wrapper around the pool based one
2013-05-31 16:25:08 -05:00
Travis Cross
04c3b913aa
Quote arguments to shell when sending email
...
Note that the function switch_util_quote_shell_arg is implemented
incorrectly for unix shells, so this is still not safe until that
function is fixed.
Reported-by: Nathan Neulinger <nneul@mst.edu>
FS-5450 --resolve
2013-05-26 01:27:16 +00:00
Travis Cross
3dd2376475
Leave room for switch_escape_string to add a terminating null
...
Thanks-to: Nathan Neulinger <nneul@mst.edu>
FS-5448 --resolve
2013-05-25 23:28:55 +00:00
William King
938699d0b6
Better to not pass tmp_socket to setsockopt if there was an error here creating the socket.
2013-05-25 07:37:28 -07:00
Jeff Lenk
66a94a2c45
windows fix trivial compiler warning
2013-05-22 10:38:04 -05:00
Anthony Minessale
1a3b69a4a6
FS-5436 --resolve
2013-05-21 19:39:02 -05:00
William King
3f06bbd04a
This was writing a null one space to the right, outside of the malloc'd buffer. On further review this uses apr_vsnprintf which always returns null terminated.
2013-05-18 13:38:24 -07:00
Anthony Minessale
2a72b02f6b
add switch_print_host
2013-03-31 21:27:25 -05:00
Anthony Minessale
abdc4bf091
add some more mime types for wav and mp3
2013-03-15 20:34:24 -05:00
Anthony Minessale
17b9f68f80
add better tolower to go with the toupper
2013-01-08 14:21:41 -06:00
Anthony Minessale
5d35d71cfd
FS-4928 doing 100 calls I found 7 million calls to toupper, this patch replaces it with an inline optimized one I found online. Not sure it helps but maybe you can profile it again with latest.
2012-12-11 19:18:25 -06:00
Jeff Lenk
27c236a03a
FS-4847 test again
2012-11-21 09:41:14 -06:00
Jeff Lenk
2ee8058488
FS-4847 try this
2012-11-20 16:54:35 -06:00
Jeff Lenk
9015b20f32
FS-4847 try this too
2012-11-19 16:28:39 -06:00
Jeff Lenk
21b9ec8868
FS-4847 --resolve
2012-11-19 16:23:55 -06:00
Anthony Minessale
c5204c2128
FS-4614 --resolve update to dynamic line buffer and use internal buffering to boot for file I/O on preprocessing XML
2012-09-18 15:39:28 -05:00
Anthony Minessale
455b22480c
FS-3971 --resolve
2012-09-04 12:30:23 -05:00
Stefan Knoblich
eca5c0ad73
FreeSWITCH: Add WIN32 strerror_s() variant to custom switch_strerror_r() helper function and fix more strerror_r() users.
...
Convert mod_xml_cdr, mod_json_cdr and mod_conference to the new function.
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-08-14 14:54:06 +02:00
Stefan Knoblich
8bcf3b4fb8
FreeSWITCH: Add switch_strerror_r() to fix problems with XSI and GNU variants of strerror_r().
...
GNU variant of strerror_r() returns char *, while the XSI version returns int.
To make things worse, glibc ships both and added a unused result warning
in recent versions (2.16) causing the build to fail.
Add our own custom wrapper that always returns a pointer to the message buffer
and additionally make XSI versions of strerror_r() GNU compatible by
returning "Unknown error xxx" if no error message is available.
Fixes:
src/switch_rtp.c: In function 'rtp_common_read':
src/switch_rtp.c:3313:15: error: ignoring return value of 'strerror_r',
declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors
Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2012-08-14 14:11:44 +02:00
Anthony Minessale
e81d31ce43
FS-4429 --resolve you guys should come to cluecon we would like to help you get bvtapi working really well
2012-07-16 13:39:23 -05:00
Ken Rice
c5554eb939
Copyright date update.
2012-04-18 11:52:02 -05:00
Anthony Minessale
e31389ac9c
FS-4097 --resolve
2012-04-10 08:05:09 -05:00
Anthony Minessale
3ca8536558
regression from 29f66f99
2012-02-23 16:21:14 -06:00
Anthony Minessale
29f66f994c
doh
2012-01-27 14:18:19 -06:00
Anthony Minessale
7471ec17ed
add printed errors to mailer part 2
2012-01-27 13:52:15 -06:00
Anthony Minessale
0b21064a05
add printed errors to mailer
2012-01-27 13:41:50 -06:00
Anthony Minessale
b8fdbc4860
FS-3808 --resove We audited for this, must have overlooked this one, thanks.
2012-01-11 21:33:23 -06:00
Jeff Lenk
24288832b1
FS-2216 partial with renaming
2012-01-08 14:19:16 -06:00
Jeff Lenk
79992ac5fe
refactor switch_fulldate_cmp and correct usec comparison and year month error
2012-01-01 22:40:23 -06:00
Jeff Lenk
26a49a6e70
FS-3753 --resolve
2011-12-11 22:15:55 -06:00
Jeff Lenk
422df6180f
trivial fix build
2011-11-21 12:50:00 -06:00
Michael Jerris
d66d41232b
don't format non numbers
2011-11-21 13:31:19 -05:00
Anthony Minessale
94b9cc0f9f
add voicemail_formatted_caller_id_number param for templates in vm
2011-11-10 14:39:28 -06:00
Anthony Minessale
1c60b9946f
d'oh you'll want to update
2011-11-04 14:26:39 -05:00
Anthony Minessale
0ed54079e4
FS-3663 --resolve
2011-11-04 13:16:54 -05:00
Anthony Minessale
1bf97fa7ba
add some more reporting data to logs
2011-10-11 15:13:23 -05:00
Michael Jerris
61dd9c0765
don't delete file if its the same file
2011-09-15 10:48:37 -04:00
Anthony Minessale
b4b99c410d
do not escape strings inside single quotes unless we can find a closing quote too
2011-09-13 16:50:05 -05:00
Anthony Minessale
dd6996cd3f
revert
2011-09-12 14:25:01 -05:00
Anthony Minessale
329e29f69d
doh
2011-09-08 16:55:40 -05:00
Anthony Minessale
7d612da440
yield when doing b64 encode to avoid stealing the cpu on single proc crappy hardware
2011-09-08 16:47:21 -05:00
Anthony Minessale
2e6ce02462
fix unlikely failure condition
2011-09-08 16:47:21 -05:00
Anthony Minessale
f3a42258d6
FS-3099 --resolve
2011-07-28 17:13:38 -05:00
Anthony Minessale
3b5a0ae50d
FS-3359 --resolve also added %y to printf macros to replace ' with \'
2011-07-07 15:08:23 -05:00
Jeff Lenk
d193789a2c
fix several problems discovered with code analysis
2011-05-30 00:07:32 -05:00
Anthony Minessale
38f06a3bf9
add additional format YYYYMMDDHHMMSS to strepoch
2011-05-19 15:39:43 -05:00
Anthony Minessale
05cb400a51
FS-3205 --resolve
2011-03-31 19:04:27 -05:00
Anthony Minessale
4ae8282e6c
fix possible bad pointer in global vars (please test)
2011-02-02 15:43:26 -06:00
Anthony Minessale
7a04104d6f
FS-2975 (part deux)
2011-01-13 18:04:05 -06:00
Anthony Minessale
c6bdb303d4
FS-2975
2011-01-13 10:58:53 -06:00
Anthony Minessale
7d1e664dc8
let switch_end_paren work with delims of the same char
2011-01-12 15:32:46 -06:00
Brian West
3734f4cd44
bump copyright date and fix some email and typos from diego.
2011-01-05 10:09:04 -06:00
Anthony Minessale
4d7e4f1ec2
change switch_strip_spaces to specify if you want it to dup the string or destroy the current buffer
2010-12-21 20:30:28 -06:00
Brian West
dad92067da
FS-535: fix issue in is_lan_addr where 172.2 would match 172.250.x.x which is not RFC1918 this also fixes an chicken egg issue
2010-11-23 18:51:17 -06:00
Brian West
db91f0e81f
FS-2842: ACL for IPv6 address and swigall to boot
2010-11-15 11:37:23 -06:00
Mathieu Rene
43aeb3b858
switch_dow_cmp: fix logic err in my latest commit
2010-10-28 10:37:21 -04:00
Mathieu Rene
7fce3995df
oops
2010-10-27 09:35:20 -04:00
Mathieu Rene
b639aebd62
fix dow to support multiple coma-separated conditions. BLUEBOX-133
2010-10-27 00:57:13 -04:00
Brian West
f42c90365c
FS-2778: force_local_ip_v4 / _v6 not handled properly in switch_find_local_ip
2010-10-13 16:52:09 -05:00
Jeff Lenk
ffd28c1930
fix build windows
2010-10-13 10:59:34 -05:00
Brian West
4e5911c291
FS-2776: FS uses IPv6 under Proxy mode, and SIP Phone uses 6to4 tunneling IPv6 address, cause hearing nothing.
2010-10-13 09:17:31 -05:00
Marc Olivier Chouinard
59ec8ced59
switch_utils: Add day of week 3 letter initial usage in "wday" field in the dialplan. Example : mon-fri. Using number as before is still supported. Several public switch function are available.
2010-09-17 00:26:27 -04:00
Marc Olivier Chouinard
c9fcce0869
switch_utils: Add date time range string compare function switch_fulldate_cmp. It usable in XML dialplan with date-time. String format example : 2009-10-10 14:33:22~2009-11-10 17:32:31.
2010-09-17 00:21:19 -04:00
Marc Olivier Chouinard
4ab8fa13e1
switch_utils: Add time of day string compare function switch_tod_cmp. It usable in XML dialplan with time-of-day. String format is hh:mm:ss you can define a range like this : 09:00-17:00 (Second are not optional)
2010-09-17 00:07:30 -04:00
Anthony Minessale
11361f69a4
hex vs. dec, strip space in switch_strip_whitespace
2010-09-02 16:39:10 -05:00
Anthony Minessale
5481d9a98c
MODSOFIA-86
2010-08-19 18:22:06 -05:00
Jeff Lenk
52f14165f8
Fix windows build
2010-06-01 20:12:33 -05:00
Mathieu Parent
3f7cafd709
Rename sofia_glue_get_user_host to switch_split_user_domain
...
and move to switch_utils. To allow use by other modules.
2010-06-02 01:09:54 +02:00
Michael Jerris
5d15dc1097
fix windows missing inet_ntop missing symbol when built on >= vista but run on < vista
2010-05-11 13:07:13 -04:00
Brian West
b5cc1a6626
FSCORE-605
2010-05-06 17:36:13 -05:00
Jeff Lenk
99eebf2f96
fix for Windows XP inet_ntop execution - you must compile with XP for support.
2010-05-05 15:15:01 -05:00
Anthony Minessale
f1430d521a
fix switch_get_addr to work with v6 properly
2010-04-30 15:27:15 -05:00