diff --git a/daemon/src/sip/sipvoiplink.cpp b/daemon/src/sip/sipvoiplink.cpp index 19023481a2b14bb9d4fd2519c57adb5cdb67f4f3..f0de0cefa04de008afff4254b43a447121a95255 100644 --- a/daemon/src/sip/sipvoiplink.cpp +++ b/daemon/src/sip/sipvoiplink.cpp @@ -459,6 +459,10 @@ SIPVoIPLink::SIPVoIPLink() : sipTransport(endpt_, cp_, pool_), evThread_(this) SIPVoIPLink::~SIPVoIPLink() { + const int MAX_TIMEOUT_ON_LEAVING = 5; + for (int timeout = 0; pjsip_tsx_layer_get_tsx_count() and timeout < MAX_TIMEOUT_ON_LEAVING; timeout++) + sleep(1); + handlingEvents_ = false; if (thread_) { pj_thread_join(thread_); diff --git a/gnome/src/dbus/dbus.c b/gnome/src/dbus/dbus.c index 49e974129a01566514dde3dbf06d75b8918023d7..bed240d6a4b2be1271c17662b5001376af422df2 100644 --- a/gnome/src/dbus/dbus.c +++ b/gnome/src/dbus/dbus.c @@ -1180,7 +1180,7 @@ void dbus_unregister(int pid) { GError *error = NULL; - org_sflphone_SFLphone_Instance_unregister(instance_proxy, pid, &error); + org_sflphone_SFLphone_Instance_unregister_async(instance_proxy, pid, NULL, NULL); check_error(error); }