Skip to content

Commit

Permalink
設定を見直し
Browse files Browse the repository at this point in the history
  • Loading branch information
torikizi committed Dec 30, 2024
1 parent eb88c0d commit 36bbab5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Sora/Sora.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ public void Connect(Config config)
}
if (m.Header != null)
{
c.SetHeader(new SoraConf.Internal.DataChannel.Header { content = m.Header });
var header = new SoraConf.Internal.DataChannel.Header();
header.content.AddRange(m.Header);
c.SetHeader(header);
}
cc.data_channels.Add(c);
}
Expand Down
5 changes: 2 additions & 3 deletions src/sora.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,8 @@ void Sora::DoConnect(const sora_conf::internal::ConnectConfig& cc,
d.compress = dc.compress;
}
if (dc.has_header()) {
const auto& header_content = dc.header.content;
d.header->reserve(header_content.size());
for (const auto& json_str : header_content) {
d.header->reserve(dc.header.content.size());
for (const auto& json_str : dc.header.content) {
boost::system::error_code ec;
auto parsed = boost::json::parse(json_str, ec);
if (ec) {
Expand Down

0 comments on commit 36bbab5

Please sign in to comment.