Skip to content

Commit

Permalink
GCC warning about copying 26 bytes from 16 byte structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Jun 20, 2024
1 parent 7e8858d commit e03b822
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xtransmit/srt_socket_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ int socket::srt_group::listen_callback_fn(void* opaq, SRTSOCKET sock, int hsvers

netaddr_any sa(peeraddr);

sockaddr host_sa = {};
int host_sa_len = sizeof host_sa;
srt_getsockname(sock, &host_sa, &host_sa_len);
netaddr_any host(&host_sa, host_sa_len);
netaddr_any host_sa;
int host_sa_len = host_sa.storage_size();
srt_getsockname(sock, host_sa.get(), &host_sa_len);
netaddr_any host(host_sa.get(), host_sa_len);
spdlog::trace(LOG_SRT_GROUP "Accepted member socket @{}, host IP {}, remote IP {}", sock, host.str(), sa.str());

// TODO: this group may no longer exist. Use some global array to track valid groups.
Expand Down

0 comments on commit e03b822

Please sign in to comment.