aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-06-03 13:45:38 +0000
committerChristian Grothoff <christian@grothoff.org>2011-06-03 13:45:38 +0000
commit3df63ac83674ebfb4cb3690173ab1778a71c0e04 (patch)
tree12e1f5f1ec61a180975c0d61dc5af4f8dd2bb568 /src/core/core_api.c
parent183a24d2f429a8ab0c2a2e3cd4957e0dbf655744 (diff)
downloadgnunet-3df63ac83674ebfb4cb3690173ab1778a71c0e04.tar.gz
gnunet-3df63ac83674ebfb4cb3690173ab1778a71c0e04.zip
fix
Diffstat (limited to 'src/core/core_api.c')
-rw-r--r--src/core/core_api.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 52f5d9258..f66eb6d2f 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -83,9 +83,10 @@ struct PeerRecord
83 void *pcic_cls; 83 void *pcic_cls;
84 84
85 /** 85 /**
86 * Pointer to free when we call pcic. 86 * Pointer to free when we call pcic and to use to cancel
87 * preference change on disconnect.
87 */ 88 */
88 void *pcic_ptr; 89 struct GNUNET_CORE_InformationRequestContext *pcic_ptr;
89 90
90 /** 91 /**
91 * Request information ID for the given pcic (needed in case a 92 * Request information ID for the given pcic (needed in case a
@@ -414,6 +415,7 @@ disconnect_and_free_peer_entry (void *cls,
414 struct GNUNET_CORE_TransmitHandle *th; 415 struct GNUNET_CORE_TransmitHandle *th;
415 struct PeerRecord *pr = value; 416 struct PeerRecord *pr = value;
416 GNUNET_CORE_PeerConfigurationInfoCallback pcic; 417 GNUNET_CORE_PeerConfigurationInfoCallback pcic;
418 void *pcic_cls;
417 419
418 while (NULL != (th = pr->pending_head)) 420 while (NULL != (th = pr->pending_head))
419 { 421 {
@@ -430,10 +432,9 @@ disconnect_and_free_peer_entry (void *cls,
430 } 432 }
431 if (NULL != (pcic = pr->pcic)) 433 if (NULL != (pcic = pr->pcic))
432 { 434 {
433 pr->pcic = NULL; 435 pcic_cls = pr->pcic_cls;
434 GNUNET_free_non_null (pr->pcic_ptr); 436 GNUNET_CORE_peer_change_preference_cancel (pr->pcic_ptr);
435 pr->pcic_ptr = NULL; 437 pcic (pcic_cls,
436 pcic (pr->pcic_cls,
437 &pr->peer, 438 &pr->peer,
438 zero, 439 zero,
439 0, 440 0,