jingle_message, muc, presence, version: Always use the check_no_attributes macro.
This commit is contained in:
parent
f2f8de773b
commit
e0438f9b88
5 changed files with 9 additions and 37 deletions
|
|
@ -28,11 +28,7 @@ pub enum JingleMI {
|
|||
}
|
||||
|
||||
fn get_sid(elem: Element) -> Result<SessionId, Error> {
|
||||
for (attr, _) in elem.attrs() {
|
||||
if attr != "id" {
|
||||
return Err(Error::ParseError("Unknown attribute in Jingle message element."));
|
||||
}
|
||||
}
|
||||
check_no_unknown_attributes!(elem, "Jingle message", ["id"]);
|
||||
Ok(SessionId(get_attr!(elem, "id", required)))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue