res_pjsip: Always set async_operations to 1.

The async_operations setting on a transport configures how
many simultaneous incoming packets the transport can handle
when multiple threads are polling and waiting on the transport.
As we only use a single thread this was needlessly creating
incoming packets when set to a non-default value, wasting memory.

ASTERISK-30006

Change-Id: I1915973ef352862dc2852a6ba4cfce2ed536e68f
This commit is contained in:
Joshua C. Colp
2022-04-06 07:23:27 -03:00
committed by Joshua Colp
parent 40f4268f2d
commit 09e8667fa5
4 changed files with 14 additions and 3 deletions

View File

@@ -659,6 +659,12 @@ static int transport_apply(const struct ast_sorcery *sorcery, void *obj)
return -1;
}
if (transport->async_operations != 1) {
ast_log(LOG_WARNING, "The async_operations setting on transport '%s' has been set to '%d'. The setting can no longer be set and is always 1.\n",
transport_id, transport->async_operations);
transport->async_operations = 1;
}
perm_state = find_internal_state_by_transport(transport);
if (perm_state) {
ast_sorcery_diff(sorcery, perm_state->transport, transport, &changes);

View File

@@ -1622,7 +1622,7 @@
will not suffice.</para></note>
</description>
<configOption name="async_operations" default="1">
<synopsis>Number of simultaneous Asynchronous Operations</synopsis>
<synopsis>Number of simultaneous Asynchronous Operations, can no longer be set, always set to 1</synopsis>
</configOption>
<configOption name="bind">
<synopsis>IP Address and optional port to bind to for this transport</synopsis>