Commit Graph

30589 Commits

Author SHA1 Message Date
Corey Farrell
ebfb8baeed main/astfd: Fix GCC8 format-truncation warning.
The field used to store call arguments was not large enough to hold the
arguments string that can be constructed for 'open'.  Expand it to
prevent this warning/error.

Change-Id: I514927f256481bc84df10a51b19d5b5fb1bc387e
2018-10-12 13:16:29 -04:00
Corey Farrell
c4b979a841 chan_sip: Tell module loader that chan_sip is extended support.
Change-Id: I33508c134b1be888b8884f5dcfee19087634e415
2018-10-10 07:36:54 -04:00
George Joseph
39698e1dfd Merge "core/frame: generate correct T.140 payload in ast_sendtext_data()" into 13 2018-10-05 14:32:57 -05:00
George Joseph
7bba0b29be Merge "func_periodic_hook.c: Cleanup module resources on failure." into 13 2018-10-05 14:31:55 -05:00
George Joseph
c007f01b4a Merge "codec_speex.c: Cleanup module loading to DECLINE and not FAILURE." into 13 2018-10-05 14:31:34 -05:00
George Joseph
674a882489 Merge "res_smdi.c: Fix module ref counting and inverted test." into 13 2018-10-05 10:51:58 -05:00
Richard Mudgett
69d62b5d04 func_periodic_hook.c: Cleanup module resources on failure.
* Make load_module() cleanup if it failed to setup the module.

* Make unload_module() always return 0.  It is silly to fail unloading if
the hook function we try to unregister was not even registered.

Change-Id: I280fc6e8ba2a7ee2588ca01d870eebaf74b4ffe6
2018-10-04 14:40:53 -05:00
Richard Mudgett
f7cc6bada6 codec_speex.c: Cleanup module loading to DECLINE and not FAILURE.
If codec_speex fails to register a translator it would cause Asterisk to
exit instead of continue as a DECLINED module.

* Make unload_module() always return 0.  It is silly to fail unloading if
any translators we try to unregister were not even registered.

Change-Id: Ia262591f68333dad17673ba7104d11c88096f51a
2018-10-04 14:36:55 -05:00
George Joseph
1311aeecfb CI: Fix missing () in gates.jenkinsfile
Change-Id: I2f252e0f8c7f1a6328438fbd2be5d6574b7dfa5b
2018-10-04 12:03:05 -06:00
Jenkins2
8f6d527349 Merge "CI: Add timestamps and timeouts to jenkinsfiles" into 13 2018-10-04 12:50:19 -05:00
George Joseph
2065fe0c04 CI: Add timestamps and timeouts to jenkinsfiles
Change-Id: Ide83574dc957bc1df28e30a69079140050dfc35f
2018-10-04 09:13:22 -06:00
George Joseph
e91cce7673 Merge "ast_coredumper: Remove .gdbinit file on exit" into 13 2018-10-04 09:42:44 -05:00
George Joseph
d85100aed0 Merge "jenkins: Fix cleanup command redirection." into 13 2018-10-04 09:40:59 -05:00
George Joseph
2c0123aad8 Merge "CI: Use brace expansion instead of calling out to seq" into 13 2018-10-04 09:40:09 -05:00
George Joseph
50cfb30734 Merge "CI: Look up configured kernel.core_pattern sysctl" into 13 2018-10-04 08:54:37 -05:00
George Joseph
1300f8b490 Merge "ast_coredumper: Don't use "declare -n"" into 13 2018-10-04 07:27:35 -05:00
George Joseph
4d6e271419 Merge "astobj2: Comment on OBJ_NOLOCK in ao2_container_clone." into 13 2018-10-04 07:25:11 -05:00
George Joseph
422b4bb112 Merge "http.c: Reload TLS even if http.conf hasn't changed" into 13 2018-10-04 07:24:02 -05:00
neutrino88
1359f673bb core/frame: generate correct T.140 payload in ast_sendtext_data()
ast_sendtext_data() would create an incorrect T.140 text frame which
length include the null terminator byte. It causes ultimately RTP
packets to be send with this trailing 0. The proposed fix just set the
correct length to the text frame

ASTERISK-28089
Reported by: Emmanuel BUU
Tested by: Emmanuel BUU

Change-Id: I7ab1b9ed1e21683b2b667ea0a59d9aba3c77dd96
2018-10-04 03:34:16 -04:00
Sean Bright
4a19205ac7 ast_coredumper: Remove .gdbinit file on exit
Change-Id: I1297de78628773ca368e687c6f148bf74857cae9
2018-10-03 18:02:27 -04:00
Sean Bright
e71c1ba045 CI: Look up configured kernel.core_pattern sysctl
Change-Id: I8246a0147df8d821fbbcabc1db1887104b8bedc4
2018-10-03 16:53:29 -05:00
Corey Farrell
e1ce997437 jenkins: Fix cleanup command redirection.
Fix redirection to /dev/null of cleanup commands.  The '2' was being
interpreted as part of the command instead of part of the redirect.

Change-Id: I2e3a591b165e0288c4b82b9ef475fdfd5392a90a
2018-10-03 16:32:19 -05:00
George Joseph
856d0f1312 ast_coredumper: Don't use "declare -n"
Change-Id: I7ddfed4cd6549a0cd458e4d5cf9ac95d784de6cb
2018-10-03 14:29:31 -06:00
George Joseph
6f44c996ae Merge "CI: Use bindport instead of port in test http.conf" into 13 2018-10-03 13:56:14 -05:00
George Joseph
6f69e5adf2 Merge "core/frame: Fix ast_frdup() and ast_frisolate() for empty text frames" into 13 2018-10-03 13:55:40 -05:00
Corey Farrell
2cec36fcc3 astobj2: Comment on OBJ_NOLOCK in ao2_container_clone.
The test for OBJ_NOLOCK looks wrong but it isn't.  Add comments to
prevent confusion.

Change-Id: I9662b82eb39e7627a1f1944fd18f967a2b987344
2018-10-03 12:02:35 -04:00
George Joseph
4b812569c8 Merge "core: Disable astobj2 locking for some common objects." into 13 2018-10-03 10:16:34 -05:00
George Joseph
d57f3f64f8 Merge "loader: Fix result of module reload error." into 13 2018-10-03 09:29:44 -05:00
Sean Bright
7c65723f91 CI: Use brace expansion instead of calling out to seq
Also make the shebang in publishAsteriskDocs.sh the first line.

Change-Id: I3fdd6f22e652e4fb5b5fe85df46fa34eb6d0cf08
2018-10-03 09:11:12 -05:00
Sean Bright
71e9a94673 CI: Use bindport instead of port in test http.conf
Change-Id: Ife9a6879da63a56e5b8348a2024eeed4e7b1615b
2018-10-03 09:59:52 -04:00
Sean Bright
c27da79ede http.c: Reload TLS even if http.conf hasn't changed
There is currently no way to indicate to Asterisk that TLS certificates
and/or keys have been updated other than by modifying http.conf or
restarting Asterisk.

There is already code in main/tcptls.c that determines if a reload is
actually necessary based on the hashes of the certicate and dependent
files, so this change merely gives us a way to request a reload without
explicitly modifying http.conf.

Change-Id: Ie795420dcc7eb3d91336820688a29adbcc321276
2018-10-03 09:34:30 -04:00
Corey Farrell
4ca65bdf17 core: Disable astobj2 locking for some common objects.
* ACO options
* Indications
* Module loader ref_debug object
* Media index info and variants
* xmldoc items

These allocation locations were identified using reflocks.py on the
master branch.

Change-Id: Ie999b9941760be3d1946cdb6e30cb85fd97504d8
2018-10-03 04:24:10 -04:00
Richard Mudgett
d55ded340f res_smdi.c: Fix module ref counting and inverted test.
I think this module is so screwed up that it doesn't work anymore.  Even
with these attempts to fix things it still won't gracefully shut down.
The module refs will not go to zero to allow unloading the module.

* Fix module ref counting dealing with the SMDI interface object.  There
were several off-nominal paths that unbalanced the module ref count.  Also
the destructor freed the ao2 object itself which is bad.  Made the
smdi_read thread not hold its own ref to the SMDI interface object so when
all refs go away the destructor will stop the listener thread.

* Fixed the smdi_load() return code of 1 concerning the number of
listeners.  The test was inverted.

Change-Id: Ic288db51b58e395d6a2fc3847f77176c16988784
2018-10-02 18:18:36 -05:00
Corey Farrell
bdd9f760ae Resolve warning about duplicate 'dialplan' CLI.
Change-Id: I029db1b4a32ccfb38374d6fe944dc430866f4b30
2018-10-02 13:28:31 -05:00
Corey Farrell
e3c18f073b loader: Fix result of module reload error.
When a module reload fails we never set AST_MODULE_RELOAD_ERROR.  This
caused reload failures to incorrectly report 'No module found'.

Change-Id: I5f3953e0f7d135e53ec797f24c97ee3f73f232e7
2018-10-02 13:14:43 -05:00
neutrino88
3d03fca94a core/frame: Fix ast_frdup() and ast_frisolate() for empty text frames
If a channel creates an AST_TEXT_FRAME with datalen == 0, the ast_frdup()
and ast_frisolate() functions could create a clone frame with an invalid
data.ptr which would cause a crash.  The proposed fix is to make sure that
for such empty text frames, ast_frdup() and ast_frisolate() return cloned
text frames with a valid data.ptr.

ASTERISK-28076
Reported by: Emmanuel BUU
Tested by: Emmanuel BUU

Change-Id: Ib882dd028598f13c4c233edbfdd7e54ad44a68e9
2018-10-02 11:24:10 -05:00
Richard Mudgett
ec52409a53 app_queue.c: Fix json ref leak
Declining the queue_member_status_type stasis message in stasis.conf
causes these messages to leak json objects.

* Add missing ast_json_unref() if the type is NULL in
queue_publish_member_blob().

ASTERISK-28084

Change-Id: I691ecf49bd1f7d9c29182e1eee8c4bb7103be9fc
2018-10-01 11:45:52 -05:00
Joshua Colp
44615acd08 Merge "jansson-bundled: Add patches to improve json_pack error reporting." into 13 2018-10-01 10:57:52 -05:00
Joshua Colp
35338370cc Merge "astobj2: Reduce memory overhead." into 13 2018-10-01 09:07:07 -05:00
Joshua Colp
dc5e8d87f7 Merge "lock: Improve performance of DEBUG_THREADS." into 13 2018-10-01 08:32:10 -05:00
Joshua Colp
a02522c140 Merge "res_pjsip: improve realtime performance on CLI 'pjsip show contacts'" into 13 2018-10-01 06:50:53 -05:00
Joshua Colp
dc03526380 Merge "res_stasis: Fix stale data in ARI bridges" into 13 2018-10-01 04:34:45 -05:00
Corey Farrell
b994c03650 jansson-bundled: Add patches to improve json_pack error reporting.
Change-Id: I045e420d5e73e60639079246e810da6ae21ae22b
2018-09-28 14:56:23 -05:00
Corey Farrell
95dc10eb72 lock: Improve performance of DEBUG_THREADS.
Add a volatile flag to lock tracking structures so we only need to use
the global lock when first initializing tracking.

Additionally add support for DEBUG_THREADS_LOOSE_ABI.  This is used by
astobj2.c to eliminate storage for tracking fields when DEBUG_THREADS is
not defined.

Change-Id: Iabd650908901843e9fff47ef1c539f0e1b8cb13b
2018-09-28 13:45:34 -05:00
George Joseph
628dc8d63c Merge "config.c: Cleanup AST_INCLUDE_GLOB" into 13 2018-09-28 13:16:23 -05:00
Kevin Harwell
fa76297e66 Merge "res_odbc: fix missing SQL error diagnostic" into 13 2018-09-28 10:38:43 -05:00
George Joseph
ef9bb05bfa Merge "res_rtp_asterisk.c: Add "seqno" strictrtp option" into 13 2018-09-28 09:27:44 -05:00
George Joseph
69660f3c9a Merge "astobj2: Fix shutdown order." into 13 2018-09-28 08:35:02 -05:00
George Joseph
921c8589ef Merge "app_queue: Fix Attended transfer hangup with removing pending member." into 13 2018-09-28 07:48:43 -05:00
Ben Ford
aa31657e28 res_rtp_asterisk.c: Add "seqno" strictrtp option
When networks experience disruptions, there can be large gaps of time
between receiving packets. When strictrtp is enabled, this created
issues where a flood of packets could come in and be seen as an attack.
Another option - seqno - has been added to the strictrtp option that
ignores the time interval and goes strictly by sequence number for
validity.

Change-Id: I8a42b8d193673899c8fc22fe7f98ea87df89be71
2018-09-28 07:28:12 -05:00