Commit c00a540e authored by DanmeiChen's avatar DanmeiChen Committed by DanmeiChen

fix crash when no proxy config

parent 9747f319
......@@ -166,7 +166,13 @@ string IdentityAddress::asString () const {
if (!d->username.empty()){
res << d->username << "@";
}
if (d->domain.find(":") != string::npos) {
res << "[" << d->domain << "]";
} else {
res << d->domain;
}
if (!d->gruu.empty()){
res << ";gr=" << d->gruu;
}
......
......@@ -238,6 +238,9 @@ bool Imdn::aggregationEnabled () const {
LinphoneProxyConfig * Imdn::getRelatedProxyConfig(){
LinphoneAddress *addr = linphone_address_new(chatRoom->getLocalAddress().asString().c_str());
if (!addr) {
return NULL;
}
LinphoneProxyConfig *cfg = linphone_core_lookup_proxy_by_identity(chatRoom->getCore()->getCCore(), addr);
linphone_address_unref(addr);
return cfg;
......
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