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:
João Mesquita
2010-01-24 20:18:24 +00:00
parent 62341a9526
commit e3ea7c61bb
6 changed files with 30 additions and 5 deletions

View File

@@ -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);
}