diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-07 17:49:10 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-07 17:49:10 +0000 |
commit | 23f103db87f8567814a1ec9ebdbb090e881ea32d (patch) | |
tree | 7a3adf5c44cbb84148b4185101696ceb46909da2 /src/include | |
parent | 0663a057d7611270d5f41ae8b345125d737387f2 (diff) | |
download | gnunet-23f103db87f8567814a1ec9ebdbb090e881ea32d.tar.gz gnunet-23f103db87f8567814a1ec9ebdbb090e881ea32d.zip |
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
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_common.h | 9 | ||||
-rw-r--r-- | src/include/gnunet_core_service.h | 13 |
2 files changed, 16 insertions, 6 deletions
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 * | |||
569 | GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber); | 569 | GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber); |
570 | 570 | ||
571 | 571 | ||
572 | |||
573 | /** | 572 | /** |
574 | * Allocate and initialize memory. Checks the return value, aborts if no more | 573 | * Allocate and initialize memory. Checks the return value, aborts if no more |
575 | * memory is available. Don't use GNUNET_xmemdup_ directly. Use the | 574 | * 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, | |||
664 | unsigned int newCount, const char *filename, int linenumber); | 663 | unsigned int newCount, const char *filename, int linenumber); |
665 | 664 | ||
666 | 665 | ||
666 | /** | ||
667 | * Create a copy of the given message. | ||
668 | * | ||
669 | * @param msg message to copy | ||
670 | * @return duplicate of the message | ||
671 | */ | ||
672 | struct GNUNET_MessageHeader * | ||
673 | GNUNET_copy_message (const struct GNUNET_MessageHeader *msg); | ||
667 | 674 | ||
668 | 675 | ||
669 | #if __STDC_VERSION__ < 199901L | 676 | #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; | |||
281 | * @param info function to call with the resulting configuration information | 281 | * @param info function to call with the resulting configuration information |
282 | * @param info_cls closure for info | 282 | * @param info_cls closure for info |
283 | * @return NULL on error | 283 | * @return NULL on error |
284 | * @deprecated will be replaced soon | ||
284 | */ | 285 | */ |
285 | struct GNUNET_CORE_InformationRequestContext * | 286 | struct GNUNET_CORE_InformationRequestContext * |
286 | GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, | 287 | GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, |
@@ -300,6 +301,7 @@ GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h, | |||
300 | * from the original request will no longer be called. | 301 | * from the original request will no longer be called. |
301 | * | 302 | * |
302 | * @param irc context returned by the original GNUNET_CORE_peer_get_info call | 303 | * @param irc context returned by the original GNUNET_CORE_peer_get_info call |
304 | * @deprecated will be replaced soon | ||
303 | */ | 305 | */ |
304 | void | 306 | void |
305 | GNUNET_CORE_peer_change_preference_cancel (struct | 307 | GNUNET_CORE_peer_change_preference_cancel (struct |
@@ -308,7 +310,9 @@ GNUNET_CORE_peer_change_preference_cancel (struct | |||
308 | 310 | ||
309 | 311 | ||
310 | /** | 312 | /** |
311 | * Iterate over all connected peers. | 313 | * Iterate over all connected peers. Calls peer_cb with each |
314 | * connected peer, and then once with NULL to indicate that all peers | ||
315 | * have been handled. | ||
312 | * | 316 | * |
313 | * @param cfg configuration handle | 317 | * @param cfg configuration handle |
314 | * @param peer_cb function to call with the peer information | 318 | * @param peer_cb function to call with the peer information |
@@ -320,11 +324,10 @@ GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
320 | GNUNET_CORE_ConnectEventHandler peer_cb, | 324 | GNUNET_CORE_ConnectEventHandler peer_cb, |
321 | void *cb_cls); | 325 | void *cb_cls); |
322 | 326 | ||
327 | |||
323 | /** | 328 | /** |
324 | * Iterate over all currently connected peers. | 329 | * Check if the given peer is currently connected and return information |
325 | * Calls peer_cb with each connected peer, and then | 330 | * about the session if so. |
326 | * once with NULL to indicate that all peers have | ||
327 | * been handled. | ||
328 | * | 331 | * |
329 | * @param cfg configuration to use | 332 | * @param cfg configuration to use |
330 | * @param peer the specific peer to check for | 333 | * @param peer the specific peer to check for |