]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
[mod_spandsp] Fix compilation against >=2023/06/02 spandsp
authorPatrice Fournier <patrice.fournier@t38fax.com>
Tue, 4 Feb 2025 20:54:26 +0000 (15:54 -0500)
committerGitHub <noreply@github.com>
Tue, 4 Feb 2025 20:54:26 +0000 (23:54 +0300)
commit76458fafc5a9cd0eebe94455ed39f41eac986c67
tree3df2457b193340995683dc6374699ff1b9eb2e50
parent6a9f151d8d16563a5a646be327d0eb3cf1b5aab8
[mod_spandsp] Fix compilation against >=2023/06/02 spandsp

* [mod_spandsp] Fix compilation against >=2023/06/02 spandsp

spandsp, beginning with commit d9681c37 and coinciding with the
SPANDSP_RELEASE_DATE of 20230620, introduced the following changes to
its V.18 protocol API, which FreeSWITCH is not able to compile against:
- Certain V.18 constants were renamed.
- The v18_init function now requires passing a third function, handling
the V.18 modem's status changes.

This patch allows FreeSWITCH to build against current versions of
spandsp by:
- Using the new V.18 constant names.
- Implementing a simple status reporter callback function and passing it
as the third function to v18_init.

Additionally, it retains backward compatibility with prior versions of
spandp through #if conditions checking the value of
SPANDSP_RELEASE_DATE.

Signed-off-by: Patrice Fournier <patrice.fournier@t38fax.com>
* [mod_spandsp] Pass session to handle_v18_status.

---------

Signed-off-by: Patrice Fournier <patrice.fournier@t38fax.com>
Co-authored-by: Morgan Scarafiotti <morgan.scarafiotti@t38fax.com>
Co-authored-by: Andrey Volk <andywolk@gmail.com>
src/mod/applications/mod_spandsp/mod_spandsp.c
src/mod/applications/mod_spandsp/mod_spandsp.h
src/mod/applications/mod_spandsp/mod_spandsp_dsp.c