aboutsummaryrefslogtreecommitdiff
path: root/src/ats/gnunet-service-ats_reservations.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/gnunet-service-ats_reservations.c')
-rw-r--r--src/ats/gnunet-service-ats_reservations.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ats/gnunet-service-ats_reservations.c b/src/ats/gnunet-service-ats_reservations.c
index ba06f7634..cea0352f5 100644
--- a/src/ats/gnunet-service-ats_reservations.c
+++ b/src/ats/gnunet-service-ats_reservations.c
@@ -152,17 +152,19 @@ GAS_handle_reservation_request (void *cls,
152 struct ReservationResultMessage result; 152 struct ReservationResultMessage result;
153 int32_t amount; 153 int32_t amount;
154 struct GNUNET_TIME_Relative res_delay; 154 struct GNUNET_TIME_Relative res_delay;
155 struct GNUNET_SERVER_NotificationContext **uc;
155 struct GNUNET_SERVER_NotificationContext *nc; 156 struct GNUNET_SERVER_NotificationContext *nc;
156 157
157 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 158 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
158 "Received RESERVATION_REQUEST message\n"); 159 "Received RESERVATION_REQUEST message\n");
159 nc = *GNUNET_SERVER_client_get_user_context (client, 160 uc = GNUNET_SERVER_client_get_user_context (client,
160 struct GNUNET_SERVER_NotificationContext *); 161 struct GNUNET_SERVER_NotificationContext *);
161 if (NULL == nc) 162 if (NULL == uc)
162 { 163 {
163 GNUNET_break (0); 164 GNUNET_break (0);
164 return; 165 return;
165 } 166 }
167 nc = *uc;
166 amount = (int32_t) ntohl (msg->amount); 168 amount = (int32_t) ntohl (msg->amount);
167 res_delay = reservations_reserve (&msg->peer, amount); 169 res_delay = reservations_reserve (&msg->peer, amount);
168 if (res_delay.rel_value_us > 0) 170 if (res_delay.rel_value_us > 0)