mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Merge branch 'develop'
This commit is contained in:
@@ -287,8 +287,8 @@ void DNS::add_additional(const resource& resource){
|
||||
|
||||
string DNS::encode_domain_name(const string& dn) {
|
||||
string output;
|
||||
size_t last_index(0), index;
|
||||
if (!dn.empty()) {
|
||||
size_t last_index(0), index;
|
||||
while ((index = dn.find('.', last_index+1)) != string::npos) {
|
||||
output.push_back(static_cast<char>(index - last_index));
|
||||
output.append(dn.begin() + last_index, dn.begin() + index);
|
||||
|
||||
@@ -215,7 +215,7 @@ void LLC::write_serialization(uint8_t* buffer, uint32_t total_sz, const Tins::PD
|
||||
break;
|
||||
}
|
||||
|
||||
for (field_list::const_iterator it = information_fields_.begin(); it != information_fields_.end(); it++) {
|
||||
for (field_list::const_iterator it = information_fields_.begin(); it != information_fields_.end(); ++it) {
|
||||
stream.write(it->begin(), it->end());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user