前言
libosip2-4.1.0升级到libosip2-5.30
修改代码
sdp_message_parse_m
旧版本
static int
sdp_message_parse_m (sdp_message_t * sdp, char *buf, char **next)
{
char *equal;
char *crlf;
char *tmp;
char *tmp_next;
int i;
sdp_media_t *m_header;
char *slash;
char *space;
*next = buf;
equal = buf;
while ((*equal != '=') && (*equal != '\0'))
equal++;
if (*equal == '\0')
return ERR_ERROR;
/* check if header is "m" */
if (equal[-1] != 'm')
return ERR_DISCARD;
新版本
static int sdp_message_parse_m(sdp_message_t *sdp, char *buf, char **next) {
char *equal;
char *crlf;
char *tmp;
char *tmp_next;
int i;
sdp_media_t *m_header;
char *slash;
char *space;
*next = buf;
equal = buf;
while ((*equal != '=') && (*equal != '\0'))
equal++;
if (*equal == '\0')
return ERR_ERROR;
/* check if header is "m" */
if (equal[-1] != 'm')
return ERR_ERROR; /* fixed Jan 10,2020: avoid a possible memory leak with m being not detected */
区别
if (equal[-1] != 'm')应该返回ERR_ERROR(-1)还是ERR_DISCARD(0)
实际上如果出现f=参数,不应该返回-1,而应该返回0,旧版本才是正确的返回方式,因此多余的f=参数
eXosip_call_send_ack_to_peer
修改为
eXosip_call_send_ack
eXosip_call_terminate_to_peer
修改为
eXosip_call_terminate
订阅函数
旧版本
eXosip_subscribe_build_initial_request
新版本
eXoisp_subscription_build_initial_subscribe
自动订阅和定时发送注册信息
旧版本
eXosip_automatic_refresh
新版本
eXoisp_auomatic_action