mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
Fix editing accounts and add more descriptive information of why it fails.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16504 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
Account::Account(QString name) :
|
||||
_name(name)
|
||||
{
|
||||
_statusCode = QString();
|
||||
_statusPhrase = QString();
|
||||
|
||||
QSettings settings;
|
||||
settings.beginGroup("FreeSWITCH/conf/sofia.conf/profiles/profile/gateways");
|
||||
foreach(QString g, settings.childGroups())
|
||||
@@ -12,7 +15,17 @@ Account::Account(QString name) :
|
||||
if(settings.value("gateway/attrs/name").toString() == name)
|
||||
{
|
||||
_uuid = g;
|
||||
settings.endGroup();
|
||||
break;
|
||||
}
|
||||
settings.endGroup();
|
||||
}
|
||||
}
|
||||
|
||||
QString Account::getStateName()
|
||||
{
|
||||
if (_statusPhrase.isEmpty())
|
||||
return fscomm_gw_state_names[_state];
|
||||
|
||||
return QString("%1 - %2").arg(fscomm_gw_state_names[_state], _statusPhrase);
|
||||
}
|
||||
|
Reference in New Issue
Block a user