aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-04-25 16:02:08 +0200
committert3sserakt <t3ss@posteo.de>2021-04-25 16:02:52 +0200
commitcef6317f17a706647c0a5d5f7e52548a7130b713 (patch)
treecc29c4d4c2ae83115a313b32653757e370b88c6c /src/util
parent9ffa19269054bf1e569fe584c0c51a00205a735d (diff)
parentb996ba4156678b6a0a551b9a932867b2ade42344 (diff)
downloadgnunet-cef6317f17a706647c0a5d5f7e52548a7130b713.tar.gz
gnunet-cef6317f17a706647c0a5d5f7e52548a7130b713.zip
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/util')
-rw-r--r--src/util/client.c2
-rw-r--r--src/util/common_logging.c16
-rw-r--r--src/util/container_meta_data.c4
-rw-r--r--src/util/crypto_rsa.c2
-rw-r--r--src/util/gnunet-config.c11
-rw-r--r--src/util/network.c2
-rw-r--r--src/util/scheduler.c2
-rw-r--r--src/util/strings.c8
-rw-r--r--src/util/tun.c4
9 files changed, 26 insertions, 25 deletions
diff --git a/src/util/client.c b/src/util/client.c
index 746c0eb55..afd2fe900 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -892,7 +892,7 @@ connection_client_cancel_impl (struct GNUNET_MQ_Handle *mq,
892 * #GNUNET_NO if the service is (definitively) down, 892 * #GNUNET_NO if the service is (definitively) down,
893 * #GNUNET_SYSERR if the configuration does not give us 893 * #GNUNET_SYSERR if the configuration does not give us
894 * the necessary information about the service, or if 894 * the necessary information about the service, or if
895 * we could not check (i.e. socket() failed) 895 * we could not check (e.g. socket() failed)
896 */ 896 */
897int 897int
898GNUNET_CLIENT_test (const struct GNUNET_CONFIGURATION_Handle *cfg, 898GNUNET_CLIENT_test (const struct GNUNET_CONFIGURATION_Handle *cfg,
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index b30175543..48cc6fe3b 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -246,27 +246,27 @@ static int gnunet_force_log_present;
246 246
247/** 247/**
248 * Convert a textual description of a loglevel 248 * Convert a textual description of a loglevel
249 * to the respective GNUNET_GE_KIND. 249 * to the respective enumeration type.
250 * 250 *
251 * @param log loglevel to parse 251 * @param log loglevel to parse
252 * @return GNUNET_GE_INVALID if log does not parse 252 * @return GNUNET_ERROR_TYPE_INVALID if log does not parse
253 */ 253 */
254static enum GNUNET_ErrorType 254static enum GNUNET_ErrorType
255get_type (const char *log) 255get_type (const char *log)
256{ 256{
257 if (NULL == log) 257 if (NULL == log)
258 return GNUNET_ERROR_TYPE_UNSPECIFIED; 258 return GNUNET_ERROR_TYPE_UNSPECIFIED;
259 if (0 == strcasecmp (log, _ ("DEBUG"))) 259 if (0 == strcasecmp (log, "DEBUG"))
260 return GNUNET_ERROR_TYPE_DEBUG; 260 return GNUNET_ERROR_TYPE_DEBUG;
261 if (0 == strcasecmp (log, _ ("INFO"))) 261 if (0 == strcasecmp (log, "INFO"))
262 return GNUNET_ERROR_TYPE_INFO; 262 return GNUNET_ERROR_TYPE_INFO;
263 if (0 == strcasecmp (log, _ ("MESSAGE"))) 263 if (0 == strcasecmp (log, "MESSAGE"))
264 return GNUNET_ERROR_TYPE_MESSAGE; 264 return GNUNET_ERROR_TYPE_MESSAGE;
265 if (0 == strcasecmp (log, _ ("WARNING"))) 265 if (0 == strcasecmp (log, "WARNING"))
266 return GNUNET_ERROR_TYPE_WARNING; 266 return GNUNET_ERROR_TYPE_WARNING;
267 if (0 == strcasecmp (log, _ ("ERROR"))) 267 if (0 == strcasecmp (log, "ERROR"))
268 return GNUNET_ERROR_TYPE_ERROR; 268 return GNUNET_ERROR_TYPE_ERROR;
269 if (0 == strcasecmp (log, _ ("NONE"))) 269 if (0 == strcasecmp (log, "NONE"))
270 return GNUNET_ERROR_TYPE_NONE; 270 return GNUNET_ERROR_TYPE_NONE;
271 return GNUNET_ERROR_TYPE_INVALID; 271 return GNUNET_ERROR_TYPE_INVALID;
272} 272}
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c
index efaac1136..2c477db40 100644
--- a/src/util/container_meta_data.c
+++ b/src/util/container_meta_data.c
@@ -337,7 +337,7 @@ GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData
337 * 337 *
338 * @param md metadata to extend 338 * @param md metadata to extend
339 * @param plugin_name name of the plugin that produced this value; 339 * @param plugin_name name of the plugin that produced this value;
340 * special values can be used (i.e. '&lt;zlib&gt;' for zlib being 340 * special values can be used (e.g. '&lt;zlib&gt;' for zlib being
341 * used in the main libextractor library and yielding 341 * used in the main libextractor library and yielding
342 * meta data). 342 * meta data).
343 * @param type libextractor-type describing the meta data 343 * @param type libextractor-type describing the meta data
@@ -427,7 +427,7 @@ GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
427 * 427 *
428 * @param cls the `struct GNUNET_CONTAINER_MetaData` to merge into 428 * @param cls the `struct GNUNET_CONTAINER_MetaData` to merge into
429 * @param plugin_name name of the plugin that produced this value; 429 * @param plugin_name name of the plugin that produced this value;
430 * special values can be used (i.e. '&lt;zlib&gt;' for zlib being 430 * special values can be used (e.g. '&lt;zlib&gt;' for zlib being
431 * used in the main libextractor library and yielding 431 * used in the main libextractor library and yielding
432 * meta data). 432 * meta data).
433 * @param type libextractor-type describing the meta data 433 * @param type libextractor-type describing the meta data
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c
index 5e4c4d1e6..4d3de00bc 100644
--- a/src/util/crypto_rsa.c
+++ b/src/util/crypto_rsa.c
@@ -473,7 +473,7 @@ rsa_gcd_validate (gcry_mpi_t r, gcry_mpi_t n)
473/** 473/**
474 * Create a blinding key 474 * Create a blinding key
475 * 475 *
476 * @param len length of the key in bits (i.e. 2048) 476 * @param len length of the key in bits (e.g. 2048)
477 * @param bks pre-secret to use to derive the blinding key 477 * @param bks pre-secret to use to derive the blinding key
478 * @return the newly created blinding key, NULL if RSA key is malicious 478 * @return the newly created blinding key, NULL if RSA key is malicious
479 */ 479 */
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c
index 2b279dda2..4d050cdd3 100644
--- a/src/util/gnunet-config.c
+++ b/src/util/gnunet-config.c
@@ -65,10 +65,11 @@ static int list_sections;
65static int global_ret; 65static int global_ret;
66 66
67/** 67/**
68 * Should we generate a configuration file that is clean and 68 * Should the generated configuration file contain the whole configuration, or
69 * only contains the deltas to the defaults? 69 * just the differences with the defaults?
70 * If set to a non-zero value, the full configuration will be written to file.
70 */ 71 */
71static int rewrite; 72static int rewrite = 0;
72 73
73 74
74/** 75/**
@@ -157,7 +158,7 @@ run (void *cls,
157 GNUNET_free (name); 158 GNUNET_free (name);
158 return; 159 return;
159 } 160 }
160 if (rewrite) 161 if (!rewrite)
161 { 162 {
162 struct GNUNET_CONFIGURATION_Handle *def; 163 struct GNUNET_CONFIGURATION_Handle *def;
163 164
@@ -315,7 +316,7 @@ main (int argc, char *const *argv)
315 'w', 316 'w',
316 "rewrite", 317 "rewrite",
317 gettext_noop ( 318 gettext_noop (
318 "write configuration file that only contains delta to defaults"), 319 "write the full configuration file, including default values"),
319 &rewrite), 320 &rewrite),
320 GNUNET_GETOPT_OPTION_END }; 321 GNUNET_GETOPT_OPTION_END };
321 int ret; 322 int ret;
diff --git a/src/util/network.c b/src/util/network.c
index c4adefb8f..e771a9834 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -1269,7 +1269,7 @@ GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds)
1269/** 1269/**
1270 * Test if the given @a port is available. 1270 * Test if the given @a port is available.
1271 * 1271 *
1272 * @param ipproto transport protocol to test (i.e. IPPROTO_TCP) 1272 * @param ipproto transport protocol to test (e.g. IPPROTO_TCP)
1273 * @param port port number to test 1273 * @param port port number to test
1274 * @return #GNUNET_OK if the port is available, #GNUNET_NO if not 1274 * @return #GNUNET_OK if the port is available, #GNUNET_NO if not
1275 */ 1275 */
diff --git a/src/util/scheduler.c b/src/util/scheduler.c
index 759312df5..d5c7b964f 100644
--- a/src/util/scheduler.c
+++ b/src/util/scheduler.c
@@ -193,7 +193,7 @@ struct GNUNET_SCHEDULER_Task
193 /** 193 /**
194 * Why is the task ready? Set after task is added to ready queue. 194 * Why is the task ready? Set after task is added to ready queue.
195 * Initially set to zero. All reasons that have already been 195 * Initially set to zero. All reasons that have already been
196 * satisfied (i.e. read or write ready) will be set over time. 196 * satisfied (e.g. read or write ready) will be set over time.
197 */ 197 */
198 enum GNUNET_SCHEDULER_Reason reason; 198 enum GNUNET_SCHEDULER_Reason reason;
199 199
diff --git a/src/util/strings.c b/src/util/strings.c
index 61e04c457..b62d5f547 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -316,7 +316,7 @@ convert_with_table (const char *input,
316/** 316/**
317 * Convert a given fancy human-readable size to bytes. 317 * Convert a given fancy human-readable size to bytes.
318 * 318 *
319 * @param fancy_size human readable string (i.e. 1 MB) 319 * @param fancy_size human readable string (e.g. 1 MB)
320 * @param size set to the size in bytes 320 * @param size set to the size in bytes
321 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 321 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
322 */ 322 */
@@ -348,7 +348,7 @@ GNUNET_STRINGS_fancy_size_to_bytes (const char *fancy_size,
348 * Convert a given fancy human-readable time to our internal 348 * Convert a given fancy human-readable time to our internal
349 * representation. 349 * representation.
350 * 350 *
351 * @param fancy_time human readable string (i.e. 1 minute) 351 * @param fancy_time human readable string (e.g. 1 minute)
352 * @param rtime set to the relative time 352 * @param rtime set to the relative time
353 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 353 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
354 */ 354 */
@@ -399,7 +399,7 @@ GNUNET_STRINGS_fancy_time_to_relative (const char *fancy_time,
399 * representation. The human-readable time is expected to be 399 * representation. The human-readable time is expected to be
400 * in local time, whereas the returned value will be in UTC. 400 * in local time, whereas the returned value will be in UTC.
401 * 401 *
402 * @param fancy_time human readable string (i.e. %Y-%m-%d %H:%M:%S) 402 * @param fancy_time human readable string (e.g. %Y-%m-%d %H:%M:%S)
403 * @param atime set to the absolute time 403 * @param atime set to the absolute time
404 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 404 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
405 */ 405 */
@@ -1364,7 +1364,7 @@ GNUNET_STRINGS_to_address_ip (const char *addr,
1364 * `struct sockaddr`. 1364 * `struct sockaddr`.
1365 * 1365 *
1366 * @param addr the address 1366 * @param addr the address
1367 * @param[out] af set to the parsed address family (i.e. AF_INET) 1367 * @param[out] af set to the parsed address family (e.g. AF_INET)
1368 * @param[out] sa set to the parsed address 1368 * @param[out] sa set to the parsed address
1369 * @return 0 on error, otherwise number of bytes in @a sa 1369 * @return 0 on error, otherwise number of bytes in @a sa
1370 */ 1370 */
diff --git a/src/util/tun.c b/src/util/tun.c
index 0e3017551..d2b675c71 100644
--- a/src/util/tun.c
+++ b/src/util/tun.c
@@ -37,7 +37,7 @@
37 * Initialize an IPv4 header. 37 * Initialize an IPv4 header.
38 * 38 *
39 * @param ip header to initialize 39 * @param ip header to initialize
40 * @param protocol protocol to use (i.e. IPPROTO_UDP) 40 * @param protocol protocol to use (e.g. IPPROTO_UDP)
41 * @param payload_length number of bytes of payload that follow (excluding IPv4 header) 41 * @param payload_length number of bytes of payload that follow (excluding IPv4 header)
42 * @param src source IP address to use 42 * @param src source IP address to use
43 * @param dst destination IP address to use 43 * @param dst destination IP address to use
@@ -72,7 +72,7 @@ GNUNET_TUN_initialize_ipv4_header (struct GNUNET_TUN_IPv4Header *ip,
72 * Initialize an IPv6 header. 72 * Initialize an IPv6 header.
73 * 73 *
74 * @param ip header to initialize 74 * @param ip header to initialize
75 * @param protocol protocol to use (i.e. IPPROTO_UDP), technically "next_header" for IPv6 75 * @param protocol protocol to use (e.g. IPPROTO_UDP), technically "next_header" for IPv6
76 * @param payload_length number of bytes of payload that follow (excluding IPv6 header) 76 * @param payload_length number of bytes of payload that follow (excluding IPv6 header)
77 * @param src source IP address to use 77 * @param src source IP address to use
78 * @param dst destination IP address to use 78 * @param dst destination IP address to use