res_pjsip: Pass the monitor matcher through register_replace.

ast_sip_transport_monitor_register_replace() dropped the caller-supplied
matcher and always passed NULL to register_replace_key(). Duplicate
monitors were then compared by pointer, so a new contact monitor was
appended on every registration instead of replacing the existing one.
Monitors accumulated on a reliable transport until that transport closed.

Fixes: #2270
pull/2323/head
Tinet-mucw 3 weeks ago
parent 9ed7b95a50
commit f3d8aed342

@ -496,7 +496,7 @@ enum ast_transport_monitor_reg ast_sip_transport_monitor_register_replace(pjsip_
char key[IP6ADDR_COLON_PORT_BUFLEN];
AST_SIP_MAKE_REMOTE_IPADDR_PORT_STR(transport, key);
return ast_sip_transport_monitor_register_replace_key(key, cb, ao2_data, NULL);
return ast_sip_transport_monitor_register_replace_key(key, cb, ao2_data, matches);
}
enum ast_transport_monitor_reg ast_sip_transport_monitor_register_replace_key(const char *transport_key,

Loading…
Cancel
Save