Dashboard

Merge "chan_vpb.cc: Fix compiler warning Jenkins found."

Merge "chan_vpb.cc: Fix compiler warning Jenkins found." into 13

Merge "chan_vpb.cc: Fix compiler warning Jenkins found." into 11

Merge "dns: Fix crash when invoking cancel in DNS recurring unit test."

Merge "sorcery/realtime: Add a bit of debug and warning messages for bad configs"

Merge "sorcery/realtime: Add a bit of debug and warning messages for bad configs" into 13

Merge "res_timing: Don't close FD 0 when out of open files."

Merge "res_timing: Don't close FD 0 when out of open files." into 13

Merge "res_timing: Don't close FD 0 when out of open files." into 11

Merge "rtp_engine: Skip useless self-assignment in ast_rtp_engine_unload_format."

Merge "rtp_engine: Skip useless self-assignment in ast_rtp_engine_unload_format." into 13

Merge "rtp_engine: Skip useless self-assignment in ast_rtp_engine_unload_format." into 11

Merge "astfd: Fix buffer overflow in DEBUG_FD_LEAKS."

Merge "astfd: Fix buffer overflow in DEBUG_FD_LEAKS." into 13

Merge "astfd: Fix buffer overflow in DEBUG_FD_LEAKS." into 11

Merge "chan_mgcp: Don't call close on fd -1."

Merge "chan_mgcp: Don't call close on fd -1." into 13

Merge "chan_mgcp: Don't call close on fd -1." into 11

dns: Fix crash when invoking cancel in DNS recurring unit test.

The recurring unit test expects the user data on a DNS query

created as a result of a recurring DNS query to be the recurring

structure itself. This is true, mostly. When invoking the user

provided callback this user data is changed to the user provided

data. This presents a race condition where the data may or may

not point to the recurring data.

This change simplifies the callback of the user provided callback

by creating a new query and populating it with the expected values.

This leaves the recurring DNS query alone and fixes the race

condition. This is more in line with how the API should be used

overall.

ASTERISK-25222 #close

Change-Id: I10fb6deec025dff097157e7ec17e6e4921778478

chan_mgcp: Don't call close on fd -1.

ASTERISK-25220 #close

Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3

chan_mgcp: Don't call close on fd -1.

ASTERISK-25220 #close

Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3

chan_mgcp: Don't call close on fd -1.

ASTERISK-25220 #close

Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3

rtp_engine: Skip useless self-assignment in ast_rtp_engine_unload_format.

When running valgrind on Asterisk, it complained about:

==32423== Source and destination overlap in memcpy(0x85a920, 0x85a920, 304)

==32423== at 0x4C2F71C: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/...)

==32423== by 0x55BA91: ast_rtp_engine_unload_format (rtp_engine.c:2292)

==32423== by 0x4EEFB7: ast_format_attr_unreg_interface (format.c:1437)

The code in question is a struct assignment, which may be performed by

memcpy as a compiler optimization. It is changed to only copy the struct

contents if source and destination are different.

ASTERISK-25219 #close

Change-Id: I6d3546c326b03378ca8e9b8cefd41c16e0088b9a

rtp_engine: Skip useless self-assignment in ast_rtp_engine_unload_format.

When running valgrind on Asterisk, it complained about:

==32423== Source and destination overlap in memcpy(0x85a920, 0x85a920, 304)

==32423== at 0x4C2F71C: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/...)

==32423== by 0x55BA91: ast_rtp_engine_unload_format (rtp_engine.c:2292)

==32423== by 0x4EEFB7: ast_format_attr_unreg_interface (format.c:1437)

The code in question is a struct assignment, which may be performed by

memcpy as a compiler optimization. It is changed to only copy the struct

contents if source and destination are different.

ASTERISK-25219 #close

Change-Id: I6d3546c326b03378ca8e9b8cefd41c16e0088b9a

rtp_engine: Skip useless self-assignment in ast_rtp_engine_unload_format.

When running valgrind on Asterisk, it complained about:

==32423== Source and destination overlap in memcpy(0x85a920, 0x85a920, 304)

==32423== at 0x4C2F71C: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/...)

==32423== by 0x55BA91: ast_rtp_engine_unload_format (rtp_engine.c:2292)

==32423== by 0x4EEFB7: ast_format_attr_unreg_interface (format.c:1437)

The code in question is a struct assignment, which may be performed by

memcpy as a compiler optimization. It is changed to only copy the struct

contents if source and destination are different.

ASTERISK-25219 #close

Change-Id: I6d3546c326b03378ca8e9b8cefd41c16e0088b9a

astfd: Fix buffer overflow in DEBUG_FD_LEAKS.

If DEBUG_FD_LEAKS was used and more file descriptors than the default of

1024 were available, some DEBUG_FD_LEAKS-patched functions would

overwrite memory past the fixed-size (1024) fdleaks buffer.

This change:

- adds bounds checks to __ast_fdleak_fopen and __ast_fdleak_pipe

- consistently uses ARRAY_LEN() instead of sizeof() or 1023 or 1024

- stores pointers to constants instead of copying the contents

- reorders the fdleaks struct for possibly tighter packing

- adds a tiny bit of documentation

ASTERISK-25212 #close

Change-Id: Iacb69e7701c0f0a113786bd946cea5b6335a85e5

astfd: Fix buffer overflow in DEBUG_FD_LEAKS.

If DEBUG_FD_LEAKS was used and more file descriptors than the default of

1024 were available, some DEBUG_FD_LEAKS-patched functions would

overwrite memory past the fixed-size (1024) fdleaks buffer.

This change:

- adds bounds checks to __ast_fdleak_fopen and __ast_fdleak_pipe

- consistently uses ARRAY_LEN() instead of sizeof() or 1023 or 1024

- stores pointers to constants instead of copying the contents

- reorders the fdleaks struct for possibly tighter packing

- adds a tiny bit of documentation

ASTERISK-25212 #close

Change-Id: Iacb69e7701c0f0a113786bd946cea5b6335a85e5

astfd: Fix buffer overflow in DEBUG_FD_LEAKS.

If DEBUG_FD_LEAKS was used and more file descriptors than the default of

1024 were available, some DEBUG_FD_LEAKS-patched functions would

overwrite memory past the fixed-size (1024) fdleaks buffer.

This change:

- adds bounds checks to __ast_fdleak_fopen and __ast_fdleak_pipe

- consistently uses ARRAY_LEN() instead of sizeof() or 1023 or 1024

- stores pointers to constants instead of copying the contents

- reorders the fdleaks struct for possibly tighter packing

- adds a tiny bit of documentation

ASTERISK-25212 #close

Change-Id: Iacb69e7701c0f0a113786bd946cea5b6335a85e5

res_timing: Don't close FD 0 when out of open files.

This fixes so a failure to get a timer file descriptor does not cascade

to closing FD 0.

On error, both res_timing_kqueue and res_timing_timerfd would call the

destructor before setting the file handle. The file handle had been

initialized to 0, causing FD 0 to be closed. This in turn, resulted in

floods of "CLI>" messages and an unusable terminal.

ASTERISK-19277 #close

Reported by: Barry Chern

Change-Id: I147d7e33726c6e5a2751928d56561494f5800350

res_timing: Don't close FD 0 when out of open files.

This fixes so a failure to get a timer file descriptor does not cascade

to closing FD 0.

On error, both res_timing_kqueue and res_timing_timerfd would call the

destructor before setting the file handle. The file handle had been

initialized to 0, causing FD 0 to be closed. This in turn, resulted in

floods of "CLI>" messages and an unusable terminal.

ASTERISK-19277 #close

Reported by: Barry Chern

For the master branch, this was already fixed. This patch only ensures

that we do not attempt to close a negative file descriptor.

Change-Id: I147d7e33726c6e5a2751928d56561494f5800350