Commit Graph

15805 Commits

Author SHA1 Message Date
Anthony Minessale 7e9c350532 avoid recomputing hash 2014-04-11 03:08:27 +05:00
Anthony Minessale f1d7721710 FS-6448 --resolve revert string func patch cos some things free it 2014-04-11 02:36:13 +05:00
Chris Rienzo a86623972d mod_rayo: fixed input crash introduced in 2014-04-07 commit 2014-04-10 10:20:47 -04:00
Travis Cross b72194b72b Move loop exit conditionals
The net effect here is the code looks more "regular" and reads more
linearly.
2014-04-09 18:41:03 +00:00
Travis Cross 4a8dace5ab Avoid considering more phrase actions after break
Previously we would continue considering phrase actions even after
receiving a break action; we would only break on the next input
clause.  It appears the intent here was to break before the next
action.
2014-04-09 18:41:02 +00:00
Travis Cross 75b8f3e0a8 Improve comment 2014-04-09 18:41:02 +00:00
Travis Cross ffc3f9bb0b Consolidate two conditionals
If we get SWITCH_STATUS_BREAK then we didn't get
SWITCH_STATUS_SUCCESS.
2014-04-09 18:41:02 +00:00
Travis Cross 549aba0d2f Remove variable assignment without effect
We're breaking out of the loop here anyway, so setting done to true is
useless.
2014-04-09 18:41:02 +00:00
Travis Cross 2ace7bc79b Fix memory leak in phrase macro playback
We were leaking memory when break_on_match was set or when we received
back SWITCH_STATUS_BREAK from a callee as we were failing to free
field_expanded_alloc.
2014-04-09 18:41:02 +00:00
Travis Cross f83d6770ff Remove tautological conditional
If pattern is null we're setting it to a non-null value, so this
branch will always be taken.

Use `git diff -w` or `git log -p -w` to see what's going on in this
commit.
2014-04-09 18:41:02 +00:00
Travis Cross 1a71cf886e Fix memory leak on memory error
In the event of a memory error, we were trying to free a null pointer
while leaking the allocation for field_expanded_alloc.
2014-04-09 18:41:02 +00:00
Travis Cross a0b8d92219 Move variables down into loop where they're used
These variables aren't used outside of this for loop, so they should
be declared within it.
2014-04-09 18:41:01 +00:00
Anthony Minessale 4178688b4a add switch_hashtable_insert_destructor so you can insert a pointer into a hash with a custom destructor and use it in spandsp to fix a leak on reloadxml with the tone_descriptor tables and fix a bunch of random tiny leaks etc 2014-04-09 23:26:47 +05:00
Anthony Minessale d789c6470a free global pool on shutdown 2014-04-09 23:26:47 +05:00
Anthony Minessale 0449baca59 clear event queue on shutdown 2014-04-09 23:26:46 +05:00
Travis Cross 2d811e0ba0 Suppress spurious warning in phrase macro playback
Prior to this commit, if anything at all went wrong in
switch_ivr_phrase_macro_event() we would generate a warning like this:

  [WARNING] switch_ivr_play_say.c:348 Macro [macro_name]: 'pattern_name' did not match any patterns

This is clearly misleading.  The natural thing to do on seeing that
message is to verify that the language files are there, and that the
pattern really does exist in that macro.  But none of that was usually
the problem.  The message would be generated if the language wasn't
found, or if the channel had gone away, for example.

With this commit, we verify that we actually tried looking for the
pattern before displaying the warning about the pattern not matching.
2014-04-09 04:48:09 +00:00
Travis Cross 1e273e514d Avoid playback on dead channels in voicemail
For years we've been generating spurious messages like:

  [WARNING] switch_ivr_play_say.c:348 Macro [voicemail_ack]: 'saved' did not match any patterns

This would happen when the caller hangs up during the playback of
certain prompts in the voicemail system where we weren't checking the
return value of vm_macro_get().  Looking closely at the log, it's
clear we were calling down into switch_ivr_phrase_macro() long after
the channel was gone.

The message above is also misleading -- switch_ivr_phrase_macro()
would have been able to find that pattern just fine, but it never
actually looked because the channel was gone.  We'll clean up that
message in a follow on commit.
2014-04-09 04:46:47 +00:00
Anthony Minessale 369bb55d15 remove unnecessary pool create 2014-04-09 03:18:21 +05:00
Travis Cross 1636550176 Add immediate sanity check on untrusted length
We were actually checking this indirectly in the loop that follows,
but it's more clear to check this immediately and directly.
2014-04-08 21:08:02 +00:00
William King 711e49c46a Don't leak these 4 hash tables when mod_fifo is reloaded 2014-04-08 11:18:23 -07:00
William King aae1954c07 FS-6442 --resolve 2014-04-08 10:36:36 -07:00
Brian West de7d5a9e07 Resolve key length issue with AES GCM 128/256 2014-04-08 11:04:41 -05:00
Anthony Minessale 72c52052dc FS-6436 2014-04-08 20:30:23 +05:00
Chris Rienzo 264a12a4af mod_rayo: fix memory corruption in dial, input, output 2014-04-07 12:37:39 -04:00
Anthony Minessale c98fb0bd0e send muted members as recvonly on RFC4575 data 2014-04-07 20:51:29 +05:00
William King 658d938754 Unused return value 2014-04-06 23:49:05 -07:00
Anthony Minessale 65fd534346 fix seg in complete del with no arg 2014-04-07 01:04:51 +05:00
Anthony Minessale a608550800 FS-5832 regression.... After this change the sticky completes were deleting. This should correct it 2014-04-06 03:51:36 +05:00
Anthony Minessale 77056e3c81 fix seg in alias del 2014-04-05 21:09:28 +05:00
Travis Cross fb7fa3d66a Update gitignore 2014-04-05 07:57:05 +00:00
Travis Cross c26343d0c9 Merge in upstream changes to my-basic
We can't use their new mb_gets() because they call exit(3) in the
event of a read error, which isn't what we want.
2014-04-05 06:48:02 +00:00
Travis Cross 8da4259539 Cleanup whitespace 2014-04-05 06:43:49 +00:00
Travis Cross 32c03b39d9 Replace gets(3) with fgets(3) in my-basic
gets(3) is going away; it's been removed by C11, and gcc now warns on
it, breaking the build.
2014-04-05 04:45:30 +00:00
Brian West 34b31f8f02 swig managed 2014-04-04 07:27:48 -05:00
Michael Jerris 5320075df7 FS-6429: --resolve check return values of fread and gets 2014-04-03 21:43:12 -04:00
Michael Jerris 98237f5962 fix mod_basic clang build warning, we don't need to declare var we don't use on this side of the ifdef 2014-04-03 19:35:43 -04:00
Michael Jerris 4e86b03126 FS-6424: --resolve properly export symbols from stfu 2014-04-03 13:58:13 -04:00
Anthony Minessale 287fd66800 FS-6403 --resolve
This commit also reverts 2 previous attempts to fix this very rare race issue spanning back to 2009

62ce853897 Patch from MOC
3a85348cdf FS-2302 mutex added around switch_xml_toxml()

The real problem was switch_xml_toxml_buf() was actually temporarily modifying the xml structure being searialized to make it appaer to be a root structure then serializing it and restoring the pointers.  This caused a non-threadsafe operation when some other thread was scanning the same xml structure.

This patch removes the modification and instead passes a new arg to switch_xml_toxml_r indicating to treat the structure as if it were a root structure.

This bug has been present since the induction of xml into FS.
2014-04-03 20:30:45 +05:00
Brian West 19e3175518 FS-6422: --resolve obvious copy and paste error 2014-04-03 07:20:41 -05:00
Anthony Minessale 1ce92b3ae7 FS-6421 --resolve 2014-04-02 16:43:36 -05:00
Jeff Lenk 554abf3e0c vs2010 reswig 2014-04-01 18:13:07 -05:00
Anthony Minessale 7151d6acea FS-6402 part 2 2014-04-02 03:21:37 +05:00
Travis Cross a78596221a Add uuid_ring_ready API command
We already had uuid_answer and uuid_pre_answer, so we might as well
add uuid_ring_ready.
2014-04-01 20:58:49 +00:00
Travis Cross 6234a94f41 Cleanup style for consistency 2014-04-01 20:54:44 +00:00
Travis Cross a8dd56f2b3 Convert my_basic files to Unix newline format 2014-04-01 20:41:19 +00:00
Anthony Minessale 5c0cff70b3 FS-6402 --resolve 2014-04-02 01:20:19 +05:00
Michael Jerris 0cc3a17072 FS-6408: fix passing of CPPFLAGS to spandsp build 2014-04-01 13:28:22 -04:00
Ken Rice 6681176ce9 prevent a segfault in mod_basic if someone calls basic from CLI w/ no args 2014-04-01 08:57:15 -05:00
Anthony Minessale e458fa2d5a allow execute with no args 2014-03-31 18:37:35 -05:00
Anthony Minessale 3a2736291e add mod_basic 2014-03-31 18:08:59 -05:00