Commit Graph

307 Commits

Author SHA1 Message Date
Ken Rice e18c12b609 FS-8953 [core] white space clean up. 2016-03-17 08:55:00 -05:00
Mark Lipscombe 4e9977507d FS-8537: Passing nil to various lua functions causes segfault
Various functions exposed via lua do not check their parameters for null
causing freeswitch to segfault.

This change adds checking for null parameters and returns an error
instead of segfaulting.
2015-11-15 10:43:09 +11:00
Mike Jerris 1968453e32 FS-8378: refactor a bit to clarify code and get better debug in gdb 2015-10-22 12:57:42 -05:00
Anthony Minessale f8592ab539 FS-8069 #resolve [ipv6 support missing in stun code] 2015-08-27 13:46:26 -05:00
Michael Giagnocavo ba9c44bbd0 FS-7885 Add getcputime command 2015-07-24 02:34:00 -06:00
François 48b44832b2 FS-7198 add coma separated values and reverse ranges for time-of-day and day-of-week matches 2015-07-09 10:43:13 +02:00
Brian 2815994647 FS-7638 properly match ACL with IPv4 mapped IPv6 addresses 2015-06-11 10:41:33 -05:00
Michael Jerris 49778c34e5 FS-7258, FS-7571: [mod_xml_cdr] properly encode xml cdr for post to web server 2015-06-02 18:54:15 -05:00
Anthony Minessale 3b2d00f3e6 FS-7587 Add ipv6 support to Verto / Websockets 2015-06-01 13:39:47 -05:00
Anthony Minessale d5e48302e6 FS-7501: improve linked list algorithm in a few places to help performance 2015-05-28 12:47:17 -05:00
Anthony Minessale 0d34e8ac77 FS-7500: add a framebuffer to reuse memory and use it to offload frame writing from video muxing thread to a dedicated write thread 2015-05-28 12:47:08 -05:00
Anthony Minessale 0c56081975 FS-7499: copy port to where apr keeps it too 2015-05-28 12:46:54 -05:00
Anthony Minessale 0d626bc715 FS-7501: more factoring on vid buffer 2015-05-28 12:46:52 -05:00
Artur Zaprzała 2d07448822 FS-7304: Multiple and reversed ranges for XML dialplan date and time conditions 2015-02-20 20:00:18 +01:00
Anthony Minessale 76370f4d17 auto urlencode user portion of sip uri 2015-01-23 21:06:02 -06:00
Anthony Minessale 5ce5199be9 FS-6969 #resolve #comment This patch should accomplish the same and handle other platforms, please test 2014-11-07 08:38:01 -06:00
Anthony Minessale 24084adf77 %FEATURE Add new feature to filter the SDP on bypass_media calls to remove or limit codecs.
VARIABLE: bypass_media_sdp_filter

Can be set globally or per leg on the inbound side of a bypass_media bridge.

VALID FILTERS:

remove(): Removes the specified codec if it exists in the SDP.
only():   Removes all codecs besides the one specified (providing that it exists in the sdp) (will not remove telephone-event))

EXAMPLE 1 (remove everything leaving only g729):

  <action application="set" data="bypass_media_sdp_filter=only(g729)"/>
  <action application="set" data="bypass_media=true"/>
  <action application="bridge" data="sofia/internal/1238@conference.freeswitch.org"/>

EXAMPLE 2 (remove everything leaving only g729 and also remove dtmf):

  <action application="set" data="bypass_media_sdp_filter=only(g729)|remove(telephone-event)"/>
  <action application="set" data="bypass_media=true"/>
  <action application="bridge" data="sofia/internal/1238@conference.freeswitch.org"/>

EXAMPLE 3 (remove alaw and speex):

  <action application="set" data="bypass_media_sdp_filter=remove(pcma)|remove(speex)"/>
  <action application="set" data="bypass_media=true"/>
  <action application="bridge" data="sofia/internal/1238@conference.freeswitch.org"/>
2014-10-01 01:28:10 +05:00
Brian West 80542e20f0 FS-5142 don't multipart/mixed if body has content-type present 2014-09-11 14:18:42 -05:00
Seven Du 590382f4a6 fix url parsing 2014-09-09 11:51:53 +08:00
Seven Du 2eed5ecf07 clean the uri to protect us from uri vulnerability attack like request /../../../../etc/passwd 2014-09-08 07:46:10 +08:00
Seven Du 023f6e148a fix http header parsing, now it accepts short header 2014-09-07 11:47:38 +08:00
Seven Du c02b2427e8 refactor http parsing and prevent read body more than content-length 2014-09-06 19:35:05 +08:00
Seven Du f5c0c13931 add http query string parsing and improve http header parsing 2014-09-06 17:21:58 +08:00
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