Permalink
Browse files

moved unencrypted broadcast warning outside loop in MDP ping so

warning appears only once, instead of every second.
  • Loading branch information...
1 parent 32ed614 commit 02b253bb295f00c7b21ed75e7e571fdfb595e443 @gardners gardners committed Apr 15, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 commandline.c
View
@@ -432,11 +432,12 @@ int app_mdp_ping(int argc,char **argv,struct command_line_option *o)
long long rx_ms=0;
long long rx_times[1024];
+ if (broadcast)
+ fprintf(stderr,"WARNING: broadcast ping packets will not be encryped.\n");
while(1) {
/* Now send the ping packets */
mdp.packetTypeAndFlags=MDP_TX;
- if (broadcast) { mdp.packetTypeAndFlags|=MDP_NOCRYPT;
- fprintf(stderr,"WARNING: broadcast ping packets will not be encryped.\n"); }
+ if (broadcast) mdp.packetTypeAndFlags|=MDP_NOCRYPT;
mdp.out.src.port=port;
bcopy(srcsid,mdp.out.src.sid,SID_SIZE);
/* Set destination to broadcast */

0 comments on commit 02b253b

Please sign in to comment.