projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adding Ludo's gnunet-download-manager.scm back to SVN HEAD
[oweals/gnunet.git]
/
src
/
core
/
gnunet-service-core_sessions.c
diff --git
a/src/core/gnunet-service-core_sessions.c
b/src/core/gnunet-service-core_sessions.c
index ab825e9b6028f84bb655dbad273a7aa37a644da9..1f697cf160d2d04e2cc2a1d5839808db0c21c67f 100644
(file)
--- a/
src/core/gnunet-service-core_sessions.c
+++ b/
src/core/gnunet-service-core_sessions.c
@@
-171,6
+171,7
@@
GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid)
{
struct Session *session;
struct GSC_ClientActiveRequest *car;
{
struct Session *session;
struct GSC_ClientActiveRequest *car;
+ struct SessionMessageEntry *sme;
session = find_session (pid);
if (NULL == session)
session = find_session (pid);
if (NULL == session)
@@
-190,6
+191,11
@@
GSC_SESSIONS_end (const struct GNUNET_PeerIdentity *pid)
session->active_client_request_tail, car);
GSC_CLIENTS_reject_request (car);
}
session->active_client_request_tail, car);
GSC_CLIENTS_reject_request (car);
}
+ while (NULL != (sme = session->sme_head))
+ {
+ GNUNET_CONTAINER_DLL_remove (session->sme_head, session->sme_tail, sme);
+ GNUNET_free (sme);
+ }
GNUNET_SCHEDULER_cancel (session->typemap_task);
GSC_CLIENTS_notify_clients_about_neighbour (&session->peer, NULL,
0 /* FIXME: ATSI */ ,
GNUNET_SCHEDULER_cancel (session->typemap_task);
GSC_CLIENTS_notify_clients_about_neighbour (&session->peer, NULL,
0 /* FIXME: ATSI */ ,
@@
-339,7
+345,7
@@
GSC_SESSIONS_queue_request (struct GSC_ClientActiveRequest *car)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Dropped client request for transmission (am disconnected)\n");
#endif
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Dropped client request for transmission (am disconnected)\n");
#endif
- GNUNET_break (0); /* should have been rejected earlier */
+ GNUNET_break (0);
/* should have been rejected earlier */
GSC_CLIENTS_reject_request (car);
return;
}
GSC_CLIENTS_reject_request (car);
return;
}
@@
-424,12
+430,15
@@
static void
solicit_messages (struct Session *session)
{
struct GSC_ClientActiveRequest *car;
solicit_messages (struct Session *session)
{
struct GSC_ClientActiveRequest *car;
+ struct GSC_ClientActiveRequest *nxt;
size_t so_size;
discard_expired_requests (session);
so_size = 0;
size_t so_size;
discard_expired_requests (session);
so_size = 0;
- for (car = session->active_client_request_head; NULL != car; car = car->next)
+ nxt = session->active_client_request_head;
+ while (NULL != (car = nxt))
{
{
+ nxt = car->next;
if (so_size + car->msize > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE)
break;
so_size += car->msize;
if (so_size + car->msize > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE)
break;
so_size += car->msize;