Commit b76d0ada authored by Joanne Hugé's avatar Joanne Hugé

Clean up the code

parent 82b6eedd
......@@ -41,7 +41,6 @@
#define MESSAGE ((uint32_t)0x00FACADE)
#define NSEC_PER_SEC 1000000000
static int process_socket_error_queue();
static void print_timestamps(struct msghdr *msg);
static void process_timestamps();
......@@ -52,7 +51,7 @@ static size_t tx_buffer_len = sizeof(tx_buffer);
static int fd;
static int so_timestamping_flags =
SOF_TIMESTAMPING_RX_SOFTWARE | SOF_TIMESTAMPING_TX_SOFTWARE | SOF_TIMESTAMPING_SOFTWARE;
SOF_TIMESTAMPING_TX_SOFTWARE | SOF_TIMESTAMPING_SOFTWARE;
// Sets the interface
static int set_if(char *network_if) {
......@@ -126,9 +125,6 @@ void send_udp_packet(int use_etf, int use_timestamps, uint64_t txtime,
struct cmsghdr *cmsg;
struct msghdr msg;
struct iovec iov;
struct pollfd poll_fd = {
.fd = fd,
};
int sendmsgerr;
int res;
fd_set readfs;
......@@ -186,7 +182,6 @@ static void process_timestamps() {
struct cmsghdr cm;
char control[512];
} control;
int res;
memset(&msg, 0, sizeof(msg));
msg.msg_iov = &entry;
......@@ -237,6 +232,7 @@ static void print_timestamps(struct msghdr *msg) {
}
}
#ifdef DEBUG
/*
* Code from scheduled_tx_tools
*/
......@@ -253,9 +249,6 @@ static int process_socket_error_queue() {
.msg_control = msg_control,
.msg_controllen = sizeof(msg_control)};
#ifdef DEBUG
printf("process_socket_error_queue\n");
#endif
if (recvmsg(fd, &msg, MSG_ERRQUEUE) == -1) {
fprintf(stderr, "recvmsg failed");
......@@ -289,4 +282,4 @@ static int process_socket_error_queue() {
return 0;
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment