diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-16 17:37:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-16 17:37:30 +0000 |
commit | 5c6866ff424ec0292ea1b5cc637c5a0d87021c82 (patch) | |
tree | e23358a037cd465a9f74d0e4864c9d3742d41ca7 /src/transport/gnunet-transport-wlan-sender.c | |
parent | 89b4941e400fce0e4abaf7b456caf11d236b2587 (diff) | |
download | gnunet-5c6866ff424ec0292ea1b5cc637c5a0d87021c82.tar.gz gnunet-5c6866ff424ec0292ea1b5cc637c5a0d87021c82.zip |
-fix
Diffstat (limited to 'src/transport/gnunet-transport-wlan-sender.c')
-rw-r--r-- | src/transport/gnunet-transport-wlan-sender.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/transport/gnunet-transport-wlan-sender.c b/src/transport/gnunet-transport-wlan-sender.c index 7592ff24f..05d1d1eef 100644 --- a/src/transport/gnunet-transport-wlan-sender.c +++ b/src/transport/gnunet-transport-wlan-sender.c | |||
@@ -108,42 +108,42 @@ main (int argc, char *argv[]) | |||
108 | time_t akt; | 108 | time_t akt; |
109 | int i; | 109 | int i; |
110 | ssize_t ret; | 110 | ssize_t ret; |
111 | pid_t pid; | ||
112 | int commpipe[2]; /* This holds the fd for the input & output of the pipe */ | ||
113 | int macpipe[2]; /* This holds the fd for the input & output of the pipe */ | ||
111 | 114 | ||
112 | if (4 != argc) | 115 | if (4 != argc) |
113 | { | 116 | { |
114 | fprintf (stderr, | 117 | fprintf (stderr, |
115 | "This program must be started with the interface and the targets and source mac as argument.\n"); | 118 | "This program must be started with the interface and the targets and source mac as argument.\n"); |
116 | fprintf (stderr, | 119 | fprintf (stderr, |
117 | "Usage: interface-name mac-target mac-source\n" | 120 | "Usage: interface-name mac-DST mac-SRC\n" |
118 | "e.g. mon0 11-22-33-44-55-66 12-34-56-78-90-ab\n"); | 121 | "e.g. mon0 11-22-33-44-55-66 12-34-56-78-90-ab\n"); |
119 | return 1; | 122 | return 1; |
120 | } | 123 | } |
121 | if (6 != | 124 | if (6 != |
122 | SSCANF (argv[3], "%x-%x-%x-%x-%x-%x", &temp[0], &temp[1], &temp[2], | 125 | SSCANF (argv[2], "%x-%x-%x-%x-%x-%x", &temp[0], &temp[1], &temp[2], |
123 | &temp[3], &temp[4], &temp[5])) | 126 | &temp[3], &temp[4], &temp[5])) |
124 | { | 127 | { |
125 | fprintf (stderr, | 128 | fprintf (stderr, |
126 | "Usage: interface-name mac-target mac-source\n" | 129 | "Usage: interface-name mac-DST mac-SRC\n" |
127 | "e.g. mon0 11-22-33-44-55-66 12-34-56-78-90-ab\n"); | 130 | "e.g. mon0 11-22-33-44-55-66 12-34-56-78-90-ab\n"); |
128 | return 1; | 131 | return 1; |
129 | } | 132 | } |
130 | for (i = 0; i < 6; i++) | 133 | for (i = 0; i < 6; i++) |
131 | outmac.mac[i] = temp[i]; | 134 | outmac.mac[i] = temp[i]; |
132 | if (6 != | 135 | if (6 != |
133 | SSCANF (argv[2], "%x-%x-%x-%x-%x-%x", &temp[0], &temp[1], &temp[2], | 136 | SSCANF (argv[3], "%x-%x-%x-%x-%x-%x", &temp[0], &temp[1], &temp[2], |
134 | &temp[3], &temp[4], &temp[5])) | 137 | &temp[3], &temp[4], &temp[5])) |
135 | { | 138 | { |
136 | fprintf (stderr, | 139 | fprintf (stderr, |
137 | "Usage: interface-name mac-target mac-source\n" | 140 | "Usage: interface-name mac-DST mac-SRC\n" |
138 | "e.g. mon0 11-22-33-44-55-66 12-34-56-78-90-ab\n"); | 141 | "e.g. mon0 11-22-33-44-55-66 12-34-56-78-90-ab\n"); |
139 | return 1; | 142 | return 1; |
140 | } | 143 | } |
141 | for (i = 0; i < 6; i++) | 144 | for (i = 0; i < 6; i++) |
142 | inmac.mac[i] = temp[i]; | 145 | inmac.mac[i] = temp[i]; |
143 | 146 | ||
144 | pid_t pid; | ||
145 | int commpipe[2]; /* This holds the fd for the input & output of the pipe */ | ||
146 | int macpipe[2]; /* This holds the fd for the input & output of the pipe */ | ||
147 | 147 | ||
148 | /* Setup communication pipeline first */ | 148 | /* Setup communication pipeline first */ |
149 | if (pipe (commpipe)) | 149 | if (pipe (commpipe)) |