diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-04-09 23:14:03 +0000 |
commit | 29e6158507a0758192075ac6ece7ba8e75ddc49a (patch) | |
tree | b91ded48da322f8ba4c9bb0f5504228aa036c2d1 /src/peerinfo/peerinfo_api_notify.c | |
parent | 5dfcb058ab5db9ae0c4b147d8a99c64ca0980028 (diff) | |
download | gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.tar.gz gnunet-29e6158507a0758192075ac6ece7ba8e75ddc49a.zip |
small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to all scheduler tasks; instead, allow the relatively few tasks that need it to obtain the context via GNUNET_SCHEDULER_get_task_context()
Diffstat (limited to 'src/peerinfo/peerinfo_api_notify.c')
-rw-r--r-- | src/peerinfo/peerinfo_api_notify.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/peerinfo/peerinfo_api_notify.c b/src/peerinfo/peerinfo_api_notify.c index 1b0974631..16331548d 100644 --- a/src/peerinfo/peerinfo_api_notify.c +++ b/src/peerinfo/peerinfo_api_notify.c | |||
@@ -99,11 +99,10 @@ receive_notifications (struct GNUNET_PEERINFO_NotifyContext *nc); | |||
99 | /** | 99 | /** |
100 | * Task to re-try connecting to peerinfo. | 100 | * Task to re-try connecting to peerinfo. |
101 | * | 101 | * |
102 | * @param cls the 'struct GNUNET_PEERINFO_NotifyContext' | 102 | * @param cls the `struct GNUNET_PEERINFO_NotifyContext *` |
103 | * @param tc scheduler context | ||
104 | */ | 103 | */ |
105 | static void | 104 | static void |
106 | reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 105 | reconnect (void *cls) |
107 | { | 106 | { |
108 | struct GNUNET_PEERINFO_NotifyContext *nc = cls; | 107 | struct GNUNET_PEERINFO_NotifyContext *nc = cls; |
109 | 108 | ||
@@ -138,7 +137,7 @@ process_notification (void *cls, const struct GNUNET_MessageHeader *msg) | |||
138 | if (msg == NULL) | 137 | if (msg == NULL) |
139 | { | 138 | { |
140 | GNUNET_CLIENT_disconnect (nc->client); | 139 | GNUNET_CLIENT_disconnect (nc->client); |
141 | reconnect (nc, NULL); | 140 | reconnect (nc); |
142 | return; | 141 | return; |
143 | } | 142 | } |
144 | ms = ntohs (msg->size); | 143 | ms = ntohs (msg->size); |