Chromium Code Reviews| Index: remoting/protocol/jingle_messages.cc |
| diff --git a/remoting/protocol/jingle_messages.cc b/remoting/protocol/jingle_messages.cc |
| index 57f9968e4ad3392e7a5df5445c94e5c2ddad4471..e9cf485aed75040f11e6899dd9d5d8d9659e0aed 100644 |
| --- a/remoting/protocol/jingle_messages.cc |
| +++ b/remoting/protocol/jingle_messages.cc |
| @@ -202,6 +202,9 @@ void SetAddress(buzz::XmlElement* iqElement, |
| const SignalingAddress& address, |
| bool from) { |
| if (address.empty()) { |
| + iqElement->ClearAttr(GetQNameByField(Field::JID, from)); |
| + iqElement->ClearAttr(GetQNameByField(Field::CHANNEL, from)); |
| + iqElement->ClearAttr(GetQNameByField(Field::ENDPOINT_ID, from)); |
|
Jamie
2016/05/20 00:48:35
I think it might be clearer to clear everything up
|
| return; |
| } |
| @@ -212,6 +215,9 @@ void SetAddress(buzz::XmlElement* iqElement, |
| address.endpoint_id); |
| const char* channel_str = ValueToName(kChannelTypes, address.channel); |
| iqElement->AddAttr(GetQNameByField(Field::CHANNEL, from), channel_str); |
| + } else { |
| + iqElement->ClearAttr(GetQNameByField(Field::CHANNEL, from)); |
| + iqElement->ClearAttr(GetQNameByField(Field::ENDPOINT_ID, from)); |
| } |
| } |