Skip to content

Commit

Permalink
update several log outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxmawt committed Nov 4, 2017
1 parent d82fa45 commit a62990d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions link_sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static void timeval_diff(const struct timeval *a,

/* Log an action on a processed packet */
#define LOG_PKT_FMT(buf, fmt, ...) \
printf("[SEQ %3u] " fmt, (uint8_t)buf[1], ##__VA_ARGS__)
fprintf(stderr,"[SEQ %3u] " fmt, (uint8_t)buf[1], ##__VA_ARGS__)
#define LOG_PKT(buf, msg) LOG_PKT_FMT(buf, msg "\n")

/* Send a packet to the host we're proxying */
Expand Down Expand Up @@ -250,7 +250,7 @@ static int process_incoming_pkt()
}
/* Check packet consistency */
if (len < MIN_PKT_LEN) {
printf("Received malformed data, dropping. "
fprintf(stderr,"Received malformed data, dropping. "
"(len < %u)\n", MIN_PKT_LEN);
return EXIT_SUCCESS;
}
Expand Down

0 comments on commit a62990d

Please sign in to comment.