diff options
Diffstat (limited to 'src/util/common_logging.c')
-rw-r--r-- | src/util/common_logging.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 527dffc02..3894cdda1 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -100,7 +100,7 @@ struct CustomLogger | |||
100 | * Asynchronous scope of the current thread, or NULL if we have not | 100 | * Asynchronous scope of the current thread, or NULL if we have not |
101 | * entered an async scope yet. | 101 | * entered an async scope yet. |
102 | */ | 102 | */ |
103 | static __thread struct GNUNET_AsyncScopeSave current_async_scope; | 103 | static GNUNET_THREAD_LOCAL struct GNUNET_AsyncScopeSave current_async_scope; |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * The last "bulk" error message that we have been logging. | 106 | * The last "bulk" error message that we have been logging. |
@@ -287,7 +287,7 @@ GNUNET_abort_ () | |||
287 | * Utility function - reallocates logdefs array to be twice as large. | 287 | * Utility function - reallocates logdefs array to be twice as large. |
288 | */ | 288 | */ |
289 | static void | 289 | static void |
290 | resize_logdefs () | 290 | resize_logdefs (void) |
291 | { | 291 | { |
292 | logdefs_size = (logdefs_size + 1) * 2; | 292 | logdefs_size = (logdefs_size + 1) * 2; |
293 | logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof(struct LogDef)); | 293 | logdefs = GNUNET_realloc (logdefs, logdefs_size * sizeof(struct LogDef)); |
@@ -1148,7 +1148,7 @@ GNUNET_h2s (const struct GNUNET_HashCode *hc) | |||
1148 | const char * | 1148 | const char * |
1149 | GNUNET_h2s2 (const struct GNUNET_HashCode *hc) | 1149 | GNUNET_h2s2 (const struct GNUNET_HashCode *hc) |
1150 | { | 1150 | { |
1151 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 1151 | static GNUNET_THREAD_LOCAL struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
1152 | 1152 | ||
1153 | GNUNET_CRYPTO_hash_to_enc (hc, &ret); | 1153 | GNUNET_CRYPTO_hash_to_enc (hc, &ret); |
1154 | ret.encoding[8] = '\0'; | 1154 | ret.encoding[8] = '\0'; |
@@ -1168,7 +1168,7 @@ GNUNET_h2s2 (const struct GNUNET_HashCode *hc) | |||
1168 | const char * | 1168 | const char * |
1169 | GNUNET_p2s (const struct GNUNET_CRYPTO_EddsaPublicKey *p) | 1169 | GNUNET_p2s (const struct GNUNET_CRYPTO_EddsaPublicKey *p) |
1170 | { | 1170 | { |
1171 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 1171 | static GNUNET_THREAD_LOCAL struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
1172 | struct GNUNET_HashCode hc; | 1172 | struct GNUNET_HashCode hc; |
1173 | 1173 | ||
1174 | GNUNET_CRYPTO_hash (p, sizeof(*p), &hc); | 1174 | GNUNET_CRYPTO_hash (p, sizeof(*p), &hc); |
@@ -1190,7 +1190,7 @@ GNUNET_p2s (const struct GNUNET_CRYPTO_EddsaPublicKey *p) | |||
1190 | const char * | 1190 | const char * |
1191 | GNUNET_p2s2 (const struct GNUNET_CRYPTO_EddsaPublicKey *p) | 1191 | GNUNET_p2s2 (const struct GNUNET_CRYPTO_EddsaPublicKey *p) |
1192 | { | 1192 | { |
1193 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 1193 | static GNUNET_THREAD_LOCAL struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
1194 | struct GNUNET_HashCode hc; | 1194 | struct GNUNET_HashCode hc; |
1195 | 1195 | ||
1196 | GNUNET_CRYPTO_hash (p, sizeof(*p), &hc); | 1196 | GNUNET_CRYPTO_hash (p, sizeof(*p), &hc); |
@@ -1212,7 +1212,7 @@ GNUNET_p2s2 (const struct GNUNET_CRYPTO_EddsaPublicKey *p) | |||
1212 | const char * | 1212 | const char * |
1213 | GNUNET_e2s (const struct GNUNET_CRYPTO_EcdhePublicKey *p) | 1213 | GNUNET_e2s (const struct GNUNET_CRYPTO_EcdhePublicKey *p) |
1214 | { | 1214 | { |
1215 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 1215 | static GNUNET_THREAD_LOCAL struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
1216 | struct GNUNET_HashCode hc; | 1216 | struct GNUNET_HashCode hc; |
1217 | 1217 | ||
1218 | GNUNET_CRYPTO_hash (p, sizeof(*p), &hc); | 1218 | GNUNET_CRYPTO_hash (p, sizeof(*p), &hc); |
@@ -1234,7 +1234,7 @@ GNUNET_e2s (const struct GNUNET_CRYPTO_EcdhePublicKey *p) | |||
1234 | const char * | 1234 | const char * |
1235 | GNUNET_e2s2 (const struct GNUNET_CRYPTO_EcdhePublicKey *p) | 1235 | GNUNET_e2s2 (const struct GNUNET_CRYPTO_EcdhePublicKey *p) |
1236 | { | 1236 | { |
1237 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 1237 | static GNUNET_THREAD_LOCAL struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
1238 | struct GNUNET_HashCode hc; | 1238 | struct GNUNET_HashCode hc; |
1239 | 1239 | ||
1240 | GNUNET_CRYPTO_hash (p, sizeof(*p), &hc); | 1240 | GNUNET_CRYPTO_hash (p, sizeof(*p), &hc); |
@@ -1256,7 +1256,7 @@ GNUNET_e2s2 (const struct GNUNET_CRYPTO_EcdhePublicKey *p) | |||
1256 | const char * | 1256 | const char * |
1257 | GNUNET_sh2s (const struct GNUNET_ShortHashCode *shc) | 1257 | GNUNET_sh2s (const struct GNUNET_ShortHashCode *shc) |
1258 | { | 1258 | { |
1259 | static char buf[64]; | 1259 | static GNUNET_THREAD_LOCAL char buf[64]; |
1260 | 1260 | ||
1261 | GNUNET_STRINGS_data_to_string (shc, sizeof(*shc), buf, sizeof(buf)); | 1261 | GNUNET_STRINGS_data_to_string (shc, sizeof(*shc), buf, sizeof(buf)); |
1262 | buf[6] = '\0'; | 1262 | buf[6] = '\0'; |
@@ -1276,7 +1276,7 @@ GNUNET_sh2s (const struct GNUNET_ShortHashCode *shc) | |||
1276 | const char * | 1276 | const char * |
1277 | GNUNET_uuid2s (const struct GNUNET_Uuid *uuid) | 1277 | GNUNET_uuid2s (const struct GNUNET_Uuid *uuid) |
1278 | { | 1278 | { |
1279 | static char buf[32]; | 1279 | static GNUNET_THREAD_LOCAL char buf[32]; |
1280 | 1280 | ||
1281 | GNUNET_STRINGS_data_to_string (uuid, sizeof(*uuid), buf, sizeof(buf)); | 1281 | GNUNET_STRINGS_data_to_string (uuid, sizeof(*uuid), buf, sizeof(buf)); |
1282 | buf[6] = '\0'; | 1282 | buf[6] = '\0'; |
@@ -1295,7 +1295,7 @@ GNUNET_uuid2s (const struct GNUNET_Uuid *uuid) | |||
1295 | const char * | 1295 | const char * |
1296 | GNUNET_h2s_full (const struct GNUNET_HashCode *hc) | 1296 | GNUNET_h2s_full (const struct GNUNET_HashCode *hc) |
1297 | { | 1297 | { |
1298 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | 1298 | static GNUNET_THREAD_LOCAL struct GNUNET_CRYPTO_HashAsciiEncoded ret; |
1299 | 1299 | ||
1300 | GNUNET_CRYPTO_hash_to_enc (hc, &ret); | 1300 | GNUNET_CRYPTO_hash_to_enc (hc, &ret); |
1301 | ret.encoding[sizeof(ret) - 1] = '\0'; | 1301 | ret.encoding[sizeof(ret) - 1] = '\0'; |
@@ -1386,9 +1386,9 @@ GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen) | |||
1386 | #define LEN \ | 1386 | #define LEN \ |
1387 | GNUNET_MAX ((INET6_ADDRSTRLEN + 8), \ | 1387 | GNUNET_MAX ((INET6_ADDRSTRLEN + 8), \ |
1388 | (1 + sizeof(struct sockaddr_un) - sizeof(sa_family_t))) | 1388 | (1 + sizeof(struct sockaddr_un) - sizeof(sa_family_t))) |
1389 | static char buf[LEN]; | 1389 | static GNUNET_THREAD_LOCAL char buf[LEN]; |
1390 | #undef LEN | 1390 | #undef LEN |
1391 | static char b2[6]; | 1391 | static GNUNET_THREAD_LOCAL char b2[6]; |
1392 | const struct sockaddr_in *v4; | 1392 | const struct sockaddr_in *v4; |
1393 | const struct sockaddr_un *un; | 1393 | const struct sockaddr_un *un; |
1394 | const struct sockaddr_in6 *v6; | 1394 | const struct sockaddr_in6 *v6; |