osmux: Define osmux_dummy cfg as boolean
Change-Id: Ifc3384f9871ddfdbd6282c6e03bf6a2dd8a09a9e
This commit is contained in:
parent
705565d745
commit
9735d21b9d
|
@ -172,10 +172,8 @@ struct mgcp_config {
|
||||||
int osmux_batch_size;
|
int osmux_batch_size;
|
||||||
/* osmux port */
|
/* osmux port */
|
||||||
uint16_t osmux_port;
|
uint16_t osmux_port;
|
||||||
/* Pad circuit with dummy messages until we see the first voice
|
/* Pad circuit with dummy AMR frames if no payload to transmit is available */
|
||||||
* message.
|
bool osmux_dummy;
|
||||||
*/
|
|
||||||
uint16_t osmux_dummy;
|
|
||||||
/* domain name of the media gateway */
|
/* domain name of the media gateway */
|
||||||
char domain[255+1];
|
char domain[255+1];
|
||||||
|
|
||||||
|
|
|
@ -544,7 +544,7 @@ int conn_osmux_enable(struct mgcp_conn_rtp *conn)
|
||||||
*/
|
*/
|
||||||
const struct mgcp_trunk *trunk = conn->conn->endp->trunk;
|
const struct mgcp_trunk *trunk = conn->conn->endp->trunk;
|
||||||
static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);
|
static const uint32_t rtp_ssrc_winlen = UINT32_MAX / (OSMUX_CID_MAX + 1);
|
||||||
uint16_t osmux_dummy = trunk->cfg->osmux_dummy;
|
bool osmux_dummy = trunk->cfg->osmux_dummy;
|
||||||
|
|
||||||
/* Check if osmux is enabled for the specified connection */
|
/* Check if osmux is enabled for the specified connection */
|
||||||
if (conn->osmux.state != OSMUX_STATE_ACTIVATING) {
|
if (conn->osmux.state != OSMUX_STATE_ACTIVATING) {
|
||||||
|
|
|
@ -1639,9 +1639,9 @@ DEFUN(cfg_mgcp_osmux_dummy,
|
||||||
"Disable dummy padding\n")
|
"Disable dummy padding\n")
|
||||||
{
|
{
|
||||||
if (strcmp(argv[0], "on") == 0)
|
if (strcmp(argv[0], "on") == 0)
|
||||||
g_cfg->osmux_dummy = 1;
|
g_cfg->osmux_dummy = true;
|
||||||
else if (strcmp(argv[0], "off") == 0)
|
else if (strcmp(argv[0], "off") == 0)
|
||||||
g_cfg->osmux_dummy = 0;
|
g_cfg->osmux_dummy = false;
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue