Skip to content

Commit

Permalink
Move the UDP rebuild to prepData so sending sends the proper data for…
Browse files Browse the repository at this point in the history
… the first frame
  • Loading branch information
dkulp committed Nov 17, 2019
1 parent 204152a commit 0e644b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/channeloutput/UDPOutput.cpp
Expand Up @@ -181,6 +181,9 @@ int UDPOutput::Close() {
}
void UDPOutput::PrepData(unsigned char *channelData) {
if (enabled) {
if (rebuildOutputLists) {
RebuildOutputMessageLists();
}
for (auto a : outputs) {
a->PrepareData(channelData);
}
Expand Down Expand Up @@ -224,9 +227,6 @@ int UDPOutput::SendMessages(int socket, std::vector<struct mmsghdr> &sendmsgs) {
}

int UDPOutput::SendData(unsigned char *channelData) {
if (rebuildOutputLists) {
RebuildOutputMessageLists();
}

if ((udpMsgs.size() == 0 && broadcastMsgs.size() == 0) || !enabled) {
return 0;
Expand Down

0 comments on commit 0e644b1

Please sign in to comment.