In some configurations where many limits are used, the limit increases
and releases were generating a lot of noise and making it harder to
see when limits were exceeded, which was at the same log level.
As an example of using mod_sofia's gateway parameter `contact-params`
we'd used the value `tport=tcp`. Looking around, it's clear this has
misled people into believing you can specify `tport=tcp` to make the
gateway use TCP or `tport=tls` to make the gateway use TLS. This does
not work.
The actual contact parameter is named `transport` rather than `tport`,
and you shouldn't use `transport` in `contact-params` because we
automatically add a `transport` to the Contact: based on the value of
`register-transport` (even if the gateway is set to not register).
It's clear why this would be confusing, so we'll just remove this as
an example.
Clang's static analyzer thinks we could be using `hosts` here when it
is NULL. We probably weren't, but it's easy to see how it could think
so. We were checking whether `from_addr` matched `ice->addr` three
times, and between the second on third time we might have modified the
`ice->addr`; however we only get there if it matched the second time,
so we could only make it not match at that point and avoid the third
branch. We can't make it match where it did not before.
We'll simplify the logic a bit here so static analyzers (and humans)
can hopefully see this more readily.
When the number of channels was zero, we were calling malloc with a
size of zero. While defined, this is unusual. And since we're
initializing the speex resampler as though there were one channel in
this case, we should probably just allocate the space for it.
Clang's static analyzer noticed the result of realloc was being
assigned to a pointer of a different type than was used to calculate
the new size. We can make things simpler and more idiomatic here by
using the correct pointer type and letting C's pointer arithmetic
automatically handle some multiplication.
We also use the distributive property here to simplify the calculation
for memset.
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.
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.
mod_curl currently does not verify the authenticity of the peer's
certificate, and does not verify whether the common name on the
certificate matches the server. This makes mod_curl initiated TLS
connections completely insecure. We should fix this, but until we do,
we'll warn people that it's not doing what they may think it is.
ref: http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html
ref: http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html
* commit 'c736cf2f22e4f0a5d490db995ebaed69b9963daa':
Add sofia gateway parameter "destination-prefix"
FS-5497 add sofia gateway parameter destination-prefix in case you need to send Invites with prefix only to this gateway
`curl_sendfile` generates a multipart message with Content-Type:
multipart/form-data with no separate Content-Type headers in the parts
for each non-file argument. These parts therefore default to
text/plain. However, prior to this commit, we were putting the URL
encoded POST data into these parts, which is not correct. We should
be putting raw text into the parts.
With this commit, we urldecode each argument key and value before
composing the multipart message.
See:
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2
* commit 'b60df39b96b05b6c3cf220d5049ea5fc20dfa6e1':
mod_http_cache: fix configuration so that carriage returns or other whitespace is OK around S3 keys
mod_http_cache: fixed S3 URL parser to allow mybucketsubdomain.com.s3.amazonaws.com
Changes by Ryan Lantzer <lantzer@mst.edu> to correct the generation of
line_instance value in outbound ringer requests as part of trying to
diagnose 79x1 series phones not using the correct ring tone for
calls coming into secondary lines.
mod_prefix is an in-memory data store optimized for fast lookups
according to the longest prefix match (LPM) rule.
Tables of key-value string pairs in JSON format can be loaded at
startup via configuration and at runtime via the API.
The implementation uses a bitwise trie (aka binary prefix tree), so
arbitrary string keys are supported.
This removes our in-tree version of portaudio-19 and migrates
mod_portaudio and mod_portaudio_stream to use the system version of
the library. Our detection of the system library relies on
pkg-config.
The new console log function here isn't any more of a channel log than
the old one. The name was bad, and no one could have been using this
yet since we just ran reswig. We'll take the same tack the kernel
developers do when replacing a function with an otherwise equivalent
one with a better API.
This allows emitting log messages that include the file name and line
number of the call. Because we have the session object here, the log
messages can be correctly associated with the session from which they
were emitted.
As when the kernel developers need to 'fix' a system call, we'll just
add a number to the name of the existing function.
If we see a certain number of RTP packets from a host and port other
than was negotiated, we adjust to send our RTP to that host and port.
Traditionally we've waited for 10 packets. This commit makes the
threshold adjustable by setting the channel variable
`rtp_auto_adjust_threshold` to any positive value less than 2^16.
* 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.