aboutsummaryrefslogtreecommitdiff
path: root/src/dns/gnunet-dns-redirector.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-06 20:55:28 +0000
commit61c39c60565b386e0e12ea669556b030e8cd7180 (patch)
tree59109aeab8297bdc996faca8c4e38ec7426c36cf /src/dns/gnunet-dns-redirector.c
parent780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff)
downloadgnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz
gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip
-remove trailing whitespace
Diffstat (limited to 'src/dns/gnunet-dns-redirector.c')
-rw-r--r--src/dns/gnunet-dns-redirector.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c
index 3df2ac21a..4d1a452a5 100644
--- a/src/dns/gnunet-dns-redirector.c
+++ b/src/dns/gnunet-dns-redirector.c
@@ -67,13 +67,13 @@ modify_record (const struct GNUNET_DNSPARSER_Record *record)
67 67
68 switch (record->type) 68 switch (record->type)
69 { 69 {
70 case GNUNET_DNSPARSER_TYPE_A: 70 case GNUNET_DNSPARSER_TYPE_A:
71 if (record->data.raw.data_len != sizeof (struct in_addr)) 71 if (record->data.raw.data_len != sizeof (struct in_addr))
72 return; 72 return;
73 if (NULL != n4) 73 if (NULL != n4)
74 { 74 {
75 if (verbosity > 1) 75 if (verbosity > 1)
76 fprintf (stderr, 76 fprintf (stderr,
77 "Changing A record from `%s' to `%s'\n", 77 "Changing A record from `%s' to `%s'\n",
78 inet_ntop (AF_INET, record->data.raw.data, buf, sizeof (buf)), 78 inet_ntop (AF_INET, record->data.raw.data, buf, sizeof (buf)),
79 n4); 79 n4);
@@ -86,7 +86,7 @@ modify_record (const struct GNUNET_DNSPARSER_Record *record)
86 if (NULL != n6) 86 if (NULL != n6)
87 { 87 {
88 if (verbosity > 1) 88 if (verbosity > 1)
89 fprintf (stderr, 89 fprintf (stderr,
90 "Changing AAAA record from `%s' to `%s'\n", 90 "Changing AAAA record from `%s' to `%s'\n",
91 inet_ntop (AF_INET6, record->data.raw.data, buf, sizeof (buf)), 91 inet_ntop (AF_INET6, record->data.raw.data, buf, sizeof (buf)),
92 n6); 92 n6);
@@ -129,7 +129,7 @@ modify_record (const struct GNUNET_DNSPARSER_Record *record)
129 * @param request_length number of bytes in request 129 * @param request_length number of bytes in request
130 * @param request udp payload of the DNS request 130 * @param request udp payload of the DNS request
131 */ 131 */
132static void 132static void
133modify_request (void *cls, 133modify_request (void *cls,
134 struct GNUNET_DNS_RequestHandle *rh, 134 struct GNUNET_DNS_RequestHandle *rh,
135 size_t request_length, 135 size_t request_length,
@@ -156,7 +156,7 @@ modify_request (void *cls,
156 if (GNUNET_OK != ret) 156 if (GNUNET_OK != ret)
157 { 157 {
158 if (GNUNET_NO == ret) 158 if (GNUNET_NO == ret)
159 fprintf (stderr, 159 fprintf (stderr,
160 "Modified DNS response did not fit, keeping old response\n"); 160 "Modified DNS response did not fit, keeping old response\n");
161 else 161 else
162 GNUNET_break (0); /* our modifications should have been sane! */ 162 GNUNET_break (0); /* our modifications should have been sane! */
@@ -169,7 +169,7 @@ modify_request (void *cls,
169 "Injecting modified DNS response\n"); 169 "Injecting modified DNS response\n");
170 GNUNET_DNS_request_answer (rh, len, buf); 170 GNUNET_DNS_request_answer (rh, len, buf);
171 } 171 }
172 GNUNET_free_non_null (buf); 172 GNUNET_free_non_null (buf);
173} 173}
174 174
175 175
@@ -219,7 +219,7 @@ run (void *cls, char *const *args, const char *cfgfile,
219 } 219 }
220 220
221 handle = 221 handle =
222 GNUNET_DNS_connect (cfg, 222 GNUNET_DNS_connect (cfg,
223 GNUNET_DNS_FLAG_POST_RESOLUTION, 223 GNUNET_DNS_FLAG_POST_RESOLUTION,
224 &modify_request, 224 &modify_request,
225 NULL); 225 NULL);