diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-23 16:41:30 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-23 16:41:30 +0000 |
commit | 151acb7d8657724bcb2334b636aa3aefc8273ddf (patch) | |
tree | 6c1b0edc0ce822528a6691925046bed56b979cb0 /src/util/common_logging.c | |
parent | f3771e363a6ef1e580ea1a67c2498f36ba2ce83e (diff) | |
download | gnunet-151acb7d8657724bcb2334b636aa3aefc8273ddf.tar.gz gnunet-151acb7d8657724bcb2334b636aa3aefc8273ddf.zip |
TG: attached are the following patches for GNUnet:
- 1: added GNUNET_i2s_full - full variant of GNUNET_i2s
- 2: GNUNET_CRYPTO_hash_from_string2 with additional length parameter,
useful to prevent an additional strlen call when the caller already knows
the length
- 3: custom mst callbacks for the server, enables using the server with a
custom parser
- 4: added GNUNET_SERVER_client_set_finish_pending_write - enables changing the
server behavior to finish pending writes when closing the connection
Best regards,
Gabor Adam Toth
Diffstat (limited to 'src/util/common_logging.c')
-rw-r--r-- | src/util/common_logging.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 59de96226..e19aa8c7c 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -948,6 +948,23 @@ GNUNET_i2s (const struct GNUNET_PeerIdentity *pid) | |||
948 | return (const char *) ret.encoding; | 948 | return (const char *) ret.encoding; |
949 | } | 949 | } |
950 | 950 | ||
951 | /** | ||
952 | * Convert a peer identity to a string (for printing debug messages). | ||
953 | * This is one of the very few calls in the entire API that is | ||
954 | * NOT reentrant! | ||
955 | * | ||
956 | * @param pid the peer identity | ||
957 | * @return string form of the pid; will be overwritten by next | ||
958 | * call to GNUNET_i2s. | ||
959 | */ | ||
960 | const char * | ||
961 | GNUNET_i2s_full (const struct GNUNET_PeerIdentity *pid) | ||
962 | { | ||
963 | static struct GNUNET_CRYPTO_HashAsciiEncoded ret; | ||
964 | |||
965 | GNUNET_CRYPTO_hash_to_enc (&pid->hashPubKey, &ret); | ||
966 | return (const char *) ret.encoding; | ||
967 | } | ||
951 | 968 | ||
952 | 969 | ||
953 | /** | 970 | /** |