Support for non-quoted descriptive names: Some Name <uri>
git-svn-id: http://voip.null.ro/svn/yate@587 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
2b0e22ac6d
commit
a893f4a8d6
1 changed files with 8 additions and 1 deletions
|
@ -148,8 +148,15 @@ void URI::parse() const
|
|||
|
||||
// the compiler generates wrong code so use the temporary
|
||||
String tmp(*this);
|
||||
bool hasDesc = false;
|
||||
Regexp r("^[[:space:]]*\"\\([^\"]\\+\\)\"[[:space:]]*\\(.*\\)$");
|
||||
if (tmp.matches(r)) {
|
||||
if (tmp.matches(r))
|
||||
hasDesc = true;
|
||||
else {
|
||||
r = "^[[:space:]]*\\([^<]\\+\\)[[:space:]]*<\\([^>]\\+\\)";
|
||||
hasDesc = tmp.matches(r);
|
||||
}
|
||||
if (hasDesc) {
|
||||
m_desc = tmp.matchString(1);
|
||||
tmp = tmp.matchString(2);
|
||||
*const_cast<URI*>(this) = tmp;
|
||||
|
|
Loading…
Reference in a new issue