diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-03-08 14:01:24 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-03-08 14:01:24 +0100 |
commit | 16586e2a93e98660e170d60a3acc65220d16a4e5 (patch) | |
tree | dde4e35077833d6f622de0883191792cda8304bb /src/gns | |
parent | e23c7a2cb37983420c49005a3f32b7ea96bfff01 (diff) | |
download | gnunet-16586e2a93e98660e170d60a3acc65220d16a4e5.tar.gz gnunet-16586e2a93e98660e170d60a3acc65220d16a4e5.zip |
just cleaning up indentation and doxygen comments
Diffstat (limited to 'src/gns')
-rw-r--r-- | src/gns/gnunet-gns-proxy.c | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 3e70bd3ca..a7c189003 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -1009,7 +1009,10 @@ check_ssl_certificate (struct Socks5Request *s5r) | |||
1009 | * @return size of processed bytes | 1009 | * @return size of processed bytes |
1010 | */ | 1010 | */ |
1011 | static size_t | 1011 | static size_t |
1012 | curl_check_hdr (void *buffer, size_t size, size_t nmemb, void *cls) | 1012 | curl_check_hdr (void *buffer, |
1013 | size_t size, | ||
1014 | size_t nmemb, | ||
1015 | void *cls) | ||
1013 | { | 1016 | { |
1014 | struct Socks5Request *s5r = cls; | 1017 | struct Socks5Request *s5r = cls; |
1015 | struct HttpResponseHeader *header; | 1018 | struct HttpResponseHeader *header; |
@@ -1147,12 +1150,20 @@ curl_check_hdr (void *buffer, size_t size, size_t nmemb, void *cls) | |||
1147 | return bytes; | 1150 | return bytes; |
1148 | } | 1151 | } |
1149 | 1152 | ||
1153 | |||
1154 | /** | ||
1155 | * Create an MHD response object in @a s5r matching the | ||
1156 | * information we got from curl. | ||
1157 | * | ||
1158 | * @param s5r the request for which we convert the response | ||
1159 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if response was | ||
1160 | * already initialized before | ||
1161 | */ | ||
1150 | static int | 1162 | static int |
1151 | create_mhd_response_from_s5r (struct Socks5Request *s5r) | 1163 | create_mhd_response_from_s5r (struct Socks5Request *s5r) |
1152 | { | 1164 | { |
1153 | long resp_code; | 1165 | long resp_code; |
1154 | double content_length; | 1166 | double content_length; |
1155 | struct HttpResponseHeader *header; | ||
1156 | 1167 | ||
1157 | if (NULL != s5r->response) | 1168 | if (NULL != s5r->response) |
1158 | { | 1169 | { |
@@ -1178,7 +1189,9 @@ create_mhd_response_from_s5r (struct Socks5Request *s5r) | |||
1178 | &mhd_content_cb, | 1189 | &mhd_content_cb, |
1179 | s5r, | 1190 | s5r, |
1180 | NULL); | 1191 | NULL); |
1181 | for (header = s5r->header_head; NULL != header; header = header->next) | 1192 | for (struct HttpResponseHeader *header = s5r->header_head; |
1193 | NULL != header; | ||
1194 | header = header->next) | ||
1182 | { | 1195 | { |
1183 | GNUNET_break (MHD_YES == | 1196 | GNUNET_break (MHD_YES == |
1184 | MHD_add_response_header (s5r->response, | 1197 | MHD_add_response_header (s5r->response, |
@@ -1222,7 +1235,10 @@ create_mhd_response_from_s5r (struct Socks5Request *s5r) | |||
1222 | * @return number of bytes handled | 1235 | * @return number of bytes handled |
1223 | */ | 1236 | */ |
1224 | static size_t | 1237 | static size_t |
1225 | curl_download_cb (void *ptr, size_t size, size_t nmemb, void* ctx) | 1238 | curl_download_cb (void *ptr, |
1239 | size_t size, | ||
1240 | size_t nmemb, | ||
1241 | void* ctx) | ||
1226 | { | 1242 | { |
1227 | struct Socks5Request *s5r = ctx; | 1243 | struct Socks5Request *s5r = ctx; |
1228 | size_t total = size * nmemb; | 1244 | size_t total = size * nmemb; |
@@ -1268,7 +1284,10 @@ curl_download_cb (void *ptr, size_t size, size_t nmemb, void* ctx) | |||
1268 | * @return number of bytes copied to @a buf | 1284 | * @return number of bytes copied to @a buf |
1269 | */ | 1285 | */ |
1270 | static size_t | 1286 | static size_t |
1271 | curl_upload_cb (void *buf, size_t size, size_t nmemb, void *cls) | 1287 | curl_upload_cb (void *buf, |
1288 | size_t size, | ||
1289 | size_t nmemb, | ||
1290 | void *cls) | ||
1272 | { | 1291 | { |
1273 | struct Socks5Request *s5r = cls; | 1292 | struct Socks5Request *s5r = cls; |
1274 | size_t len = size * nmemb; | 1293 | size_t len = size * nmemb; |
@@ -1482,7 +1501,7 @@ curl_task_download (void *cls) | |||
1482 | * @param kind value kind | 1501 | * @param kind value kind |
1483 | * @param key field key | 1502 | * @param key field key |
1484 | * @param value field value | 1503 | * @param value field value |
1485 | * @return MHD_YES to continue to iterate | 1504 | * @return #MHD_YES to continue to iterate |
1486 | */ | 1505 | */ |
1487 | static int | 1506 | static int |
1488 | con_val_iter (void *cls, | 1507 | con_val_iter (void *cls, |
@@ -1532,9 +1551,9 @@ con_val_iter (void *cls, | |||
1532 | * @param upload_data_size set initially to the size of the | 1551 | * @param upload_data_size set initially to the size of the |
1533 | * @a upload_data provided; the method must update this | 1552 | * @a upload_data provided; the method must update this |
1534 | * value to the number of bytes NOT processed; | 1553 | * value to the number of bytes NOT processed; |
1535 | * @param con_cls pointer to location where we store the 'struct Request' | 1554 | * @param con_cls pointer to location where we store the `struct Request` |
1536 | * @return MHD_YES if the connection was handled successfully, | 1555 | * @return #MHD_YES if the connection was handled successfully, |
1537 | * MHD_NO if the socket must be closed due to a serious | 1556 | * #MHD_NO if the socket must be closed due to a serious |
1538 | * error while handling the request | 1557 | * error while handling the request |
1539 | */ | 1558 | */ |
1540 | static int | 1559 | static int |