Commit b29b7d95 authored by jehan's avatar jehan
Browse files

fix crash if udp lp cannot be create. avoid double notification of refresher in case of error

parent eb411e1e
......@@ -40,8 +40,8 @@ static void process_io_error(void *user_ctx, const belle_sip_io_error_event_t *e
if (belle_sip_object_is_instance_of(BELLE_SIP_OBJECT(belle_sip_io_error_event_get_source(event)),BELLE_SIP_TYPE_ID(belle_sip_client_transaction_t))) {
client_transaction=BELLE_SIP_CLIENT_TRANSACTION(belle_sip_io_error_event_get_source(event));
if (refresher && (client_transaction !=refresher->transaction))
return; /*not for me*/
if (!refresher || (refresher && (!refresher->started || client_transaction !=refresher->transaction )))
return; /*not for me or no longuer involved*/
/*first stop timer if any*/
belle_sip_refresher_stop(refresher);
......
......@@ -170,7 +170,7 @@ belle_sip_listening_point_t * belle_sip_udp_listening_point_new(belle_sip_stack_
belle_sip_udp_listening_point_t *lp=belle_sip_object_new(belle_sip_udp_listening_point_t);
belle_sip_udp_listening_point_init(lp,s,ipaddress, port);
if (lp->sock==(belle_sip_socket_t)-1){
belle_sip_object_unref(s);
belle_sip_object_unref(lp);
return NULL;
}
return (belle_sip_listening_point_t*)lp;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment