diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-09-03 15:32:01 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-09-03 15:32:01 +0000 |
commit | 734f4aaaeb4613414ddf00d0f86335d0a262c67a (patch) | |
tree | f002ceee3fbf2cd3ceeb32431698728671589088 /src/core | |
parent | 16b21a18ddc47de49e320a9b6a6da3cef26e3429 (diff) | |
download | gnunet-734f4aaaeb4613414ddf00d0f86335d0a262c67a.tar.gz gnunet-734f4aaaeb4613414ddf00d0f86335d0a262c67a.zip |
handle null continuation
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/core_api_peer_request.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/core_api_peer_request.c b/src/core/core_api_peer_request.c index fa5764af6..2578e6452 100644 --- a/src/core/core_api_peer_request.c +++ b/src/core/core_api_peer_request.c | |||
@@ -106,10 +106,13 @@ send_request (void *cls, | |||
106 | msg.timeout = GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining (prh->timeout)); | 106 | msg.timeout = GNUNET_TIME_relative_hton (GNUNET_TIME_absolute_get_remaining (prh->timeout)); |
107 | msg.peer = prh->peer; | 107 | msg.peer = prh->peer; |
108 | memcpy (buf, &msg, sizeof (msg)); | 108 | memcpy (buf, &msg, sizeof (msg)); |
109 | GNUNET_SCHEDULER_add_continuation (prh->sched, | 109 | if (prh->cont != NULL) |
110 | prh->cont, | 110 | { |
111 | prh->cont_cls, | 111 | GNUNET_SCHEDULER_add_continuation (prh->sched, |
112 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | 112 | prh->cont, |
113 | prh->cont_cls, | ||
114 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
115 | } | ||
113 | GNUNET_CLIENT_disconnect (prh->client, GNUNET_YES); | 116 | GNUNET_CLIENT_disconnect (prh->client, GNUNET_YES); |
114 | GNUNET_free (prh); | 117 | GNUNET_free (prh); |
115 | return sizeof (msg); | 118 | return sizeof (msg); |