From 23f103db87f8567814a1ec9ebdbb090e881ea32d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 7 Oct 2011 17:49:10 +0000 Subject: LRN: Small janitor fixes * Prevent janitor from failing if a process can't be killed (it might be dead by the time janitor gets around to killing it). * Fix janitor messages about killing arm/non-arm processes --- src/include/gnunet_common.h | 9 ++++++++- src/include/gnunet_core_service.h | 13 ++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'src/include') diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 6b3ffe2af..ec54aece4 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -569,7 +569,6 @@ void * GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber); - /** * Allocate and initialize memory. Checks the return value, aborts if no more * memory is available. Don't use GNUNET_xmemdup_ directly. Use the @@ -664,6 +663,14 @@ GNUNET_xgrow_ (void **old, size_t elementSize, unsigned int *oldCount, unsigned int newCount, const char *filename, int linenumber); +/** + * Create a copy of the given message. + * + * @param msg message to copy + * @return duplicate of the message + */ +struct GNUNET_MessageHeader * +GNUNET_copy_message (const struct GNUNET_MessageHeader *msg); #if __STDC_VERSION__ < 199901L diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index 4eddda41f..7419b44a2 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h @@ -281,6 +281,7 @@ struct GNUNET_CORE_InformationRequestContext; * @param info function to call with the resulting configuration information * @param info_cls closure for info * @return NULL on error + * @deprecated will be replaced soon */ struct GNUNET_CORE_InformationRequestContext * GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, @@ -300,6 +301,7 @@ GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, * from the original request will no longer be called. * * @param irc context returned by the original GNUNET_CORE_peer_get_info call + * @deprecated will be replaced soon */ void GNUNET_CORE_peer_change_preference_cancel (struct @@ -308,7 +310,9 @@ GNUNET_CORE_peer_change_preference_cancel (struct /** - * Iterate over all connected peers. + * Iterate over all connected peers. Calls peer_cb with each + * connected peer, and then once with NULL to indicate that all peers + * have been handled. * * @param cfg configuration handle * @param peer_cb function to call with the peer information @@ -320,11 +324,10 @@ GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_CORE_ConnectEventHandler peer_cb, void *cb_cls); + /** - * Iterate over all currently connected peers. - * Calls peer_cb with each connected peer, and then - * once with NULL to indicate that all peers have - * been handled. + * Check if the given peer is currently connected and return information + * about the session if so. * * @param cfg configuration to use * @param peer the specific peer to check for -- cgit v1.2.3