Skip to content

Commit

Permalink
send_poll() returns tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ka9q committed Apr 17, 2023
1 parent b121923 commit 46a3149
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion status.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@ int64_t random_time(int64_t base,int64_t rrange){
}

// Send empty poll command on specified descriptor
void send_poll(int fd,int ssrc){
// Return command tag
uint32_t send_poll(int fd,int ssrc){
uint8_t cmdbuffer[128];
uint8_t *bp = cmdbuffer;
*bp++ = 1; // Command
Expand All @@ -320,6 +321,7 @@ void send_poll(int fd,int ssrc){
int const command_len = bp - cmdbuffer;
if(send(fd, cmdbuffer, command_len, 0) != command_len)
perror("poll command send");
return tag;
}


Expand Down
2 changes: 1 addition & 1 deletion status.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,6 @@ int get_ssrc(uint8_t const *buffer,int length);
void dump_metadata(uint8_t const *,int);

int64_t random_time(int64_t base,int64_t rrange);
void send_poll(int fd,int ssrc);
uint32_t send_poll(int fd,int ssrc);

#endif

0 comments on commit 46a3149

Please sign in to comment.