Skip to content

Commit

Permalink
even more cowbell
Browse files Browse the repository at this point in the history
  • Loading branch information
ka9q committed Apr 18, 2023
1 parent a303105 commit 3b1aa54
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions powers.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ int main(int argc,char *argv[]){
}
resolve_mcast(argv[optind],&Metadata_dest_address,DEFAULT_STAT_PORT,Iface,sizeof(Iface));
if(Verbose)
fprintf(stderr,"%s -> %s\n",argv[optind],formatsock(&Metadata_dest_address));
fprintf(stderr,"Resolved %s -> %s\n",argv[optind],formatsock(&Metadata_dest_address));

Status_fd = listen_mcast(&Metadata_dest_address,Iface);
if(Status_fd == -1){
fprintf(stderr,"Can't listen to mcast status %s\n",argv[optind]);
Expand Down Expand Up @@ -126,8 +127,10 @@ int main(int argc,char *argv[]){

encode_eol(&bp);
int const command_len = bp - buffer;
if(Verbose > 1)
if(Verbose > 1){
printf("Sent: ");
dump_metadata(buffer+1,command_len-1);
}
if(send(Ctl_fd, buffer, command_len, 0) != command_len){
perror("command send");
usleep(1000000);
Expand Down Expand Up @@ -167,9 +170,10 @@ int main(int argc,char *argv[]){
// This is needed because an initial delay in joining multicast groups produces a burst of buffered responses; investigate this
} while(length < 2 || buffer[0] != 0 || Ssrc != get_ssrc(buffer+1,length-1) || tag != get_tag(buffer+1,length-1));

if(Verbose > 1)
if(Verbose > 1){
printf("Received: ");
dump_metadata(buffer+1,length-1);

}
float powers[65536];
uint64_t time;
double r_freq;
Expand Down

0 comments on commit 3b1aa54

Please sign in to comment.