The generic param is token = token or quoted string, with optional space around the '='. The name is defined as a token, but this is not significant in the grammar; name is terminated by space or '='. pp may point to space, scan past that first. Leave pp pointing at the char immediately after the param, which may be a space or separator.
| 248 | // pp may point to space, scan past that first. |
| 249 | // Leave pp pointing at the char immediately after the param, which may be a space or separator. |
| 250 | bool scanGenericParam(SipParam ¶m) |
| 251 | { |
| 252 | const char *start = pp; |
| 253 | param.mName = scanToken(); |
| 254 | if (scanChar('=')) { |
| 255 | param.mValue = scanTokenOrQuotedString(); |
| 256 | if (param.mName.empty()) { |
| 257 | LOG(NOTICE) << "empty parameter ignored in:"<<currentLine; |
| 258 | return false; |
| 259 | } |
| 260 | } else { |
| 261 | param.mValue.clear(); |
| 262 | } |
| 263 | // not needed: skipSpace(); |
| 264 | LOG(DEBUG)<< LOGVAR(param.mName)<<LOGVAR(param.mValue)<<LOGVAR(start); |
| 265 | return ! param.mName.empty(); |
| 266 | } |
| 267 | |
| 268 | // The URI may have almost any chars except it may not have embedded space. |
| 269 | string parseLineURI(SipParamList ¶ms, SipParamList &headers) |
no test coverage detected