aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_mesh_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-service-fs_mesh_server.c')
-rw-r--r--src/fs/gnunet-service-fs_mesh_server.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/fs/gnunet-service-fs_mesh_server.c b/src/fs/gnunet-service-fs_mesh_server.c
index 206ff6e75..e732da990 100644
--- a/src/fs/gnunet-service-fs_mesh_server.c
+++ b/src/fs/gnunet-service-fs_mesh_server.c
@@ -72,22 +72,22 @@ struct MeshClient
72{ 72{
73 /** 73 /**
74 * DLL 74 * DLL
75 */ 75 */
76 struct MeshClient *next; 76 struct MeshClient *next;
77 77
78 /** 78 /**
79 * DLL 79 * DLL
80 */ 80 */
81 struct MeshClient *prev; 81 struct MeshClient *prev;
82 82
83 /** 83 /**
84 * Tunnel for communication. 84 * Tunnel for communication.
85 */ 85 */
86 struct GNUNET_MESH_Tunnel *tunnel; 86 struct GNUNET_MESH_Tunnel *tunnel;
87 87
88 /** 88 /**
89 * Handle for active write operation, or NULL. 89 * Handle for active write operation, or NULL.
90 */ 90 */
91 struct GNUNET_MESH_TransmitHandle *wh; 91 struct GNUNET_MESH_TransmitHandle *wh;
92 92
93 /** 93 /**
@@ -99,7 +99,7 @@ struct MeshClient
99 * Tail of write queue. 99 * Tail of write queue.
100 */ 100 */
101 struct WriteQueueItem *wqi_tail; 101 struct WriteQueueItem *wqi_tail;
102 102
103 /** 103 /**
104 * Current active request to the datastore, if we have one pending. 104 * Current active request to the datastore, if we have one pending.
105 */ 105 */
@@ -117,7 +117,7 @@ struct MeshClient
117 117
118 /** 118 /**
119 * Size of the last write that was initiated. 119 * Size of the last write that was initiated.
120 */ 120 */
121 size_t reply_size; 121 size_t reply_size;
122 122
123}; 123};
@@ -130,12 +130,12 @@ static struct GNUNET_MESH_Handle *listen_tunnel;
130 130
131/** 131/**
132 * Head of DLL of mesh clients. 132 * Head of DLL of mesh clients.
133 */ 133 */
134static struct MeshClient *sc_head; 134static struct MeshClient *sc_head;
135 135
136/** 136/**
137 * Tail of DLL of mesh clients. 137 * Tail of DLL of mesh clients.
138 */ 138 */
139static struct MeshClient *sc_tail; 139static struct MeshClient *sc_tail;
140 140
141/** 141/**
@@ -155,7 +155,7 @@ static unsigned long long sc_count_max;
155 * 155 *
156 * @param cls the 'struct MeshClient' 156 * @param cls the 'struct MeshClient'
157 * @param tc scheduler context 157 * @param tc scheduler context
158 */ 158 */
159static void 159static void
160timeout_mesh_task (void *cls, 160timeout_mesh_task (void *cls,
161 const struct GNUNET_SCHEDULER_TaskContext *tc) 161 const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -182,7 +182,7 @@ static void
182refresh_timeout_task (struct MeshClient *sc) 182refresh_timeout_task (struct MeshClient *sc)
183{ 183{
184 if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task) 184 if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task)
185 GNUNET_SCHEDULER_cancel (sc->timeout_task); 185 GNUNET_SCHEDULER_cancel (sc->timeout_task);
186 sc->timeout_task = GNUNET_SCHEDULER_add_delayed (IDLE_TIMEOUT, 186 sc->timeout_task = GNUNET_SCHEDULER_add_delayed (IDLE_TIMEOUT,
187 &timeout_mesh_task, 187 &timeout_mesh_task,
188 sc); 188 sc);
@@ -291,7 +291,7 @@ continue_writing (struct MeshClient *sc)
291 } 291 }
292 sc->wh = GNUNET_MESH_notify_transmit_ready (sc->tunnel, GNUNET_NO, 292 sc->wh = GNUNET_MESH_notify_transmit_ready (sc->tunnel, GNUNET_NO,
293 GNUNET_TIME_UNIT_FOREVER_REL, 293 GNUNET_TIME_UNIT_FOREVER_REL,
294 wqi->msize, 294 wqi->msize,
295 &write_continuation, 295 &write_continuation,
296 sc); 296 sc);
297 if (NULL == sc->wh) 297 if (NULL == sc->wh)
@@ -320,7 +320,7 @@ continue_writing (struct MeshClient *sc)
320 * @param uid unique identifier for the datum; 320 * @param uid unique identifier for the datum;
321 * maybe 0 if no unique identifier is available 321 * maybe 0 if no unique identifier is available
322 */ 322 */
323static void 323static void
324handle_datastore_reply (void *cls, 324handle_datastore_reply (void *cls,
325 const struct GNUNET_HashCode *key, 325 const struct GNUNET_HashCode *key,
326 size_t size, const void *data, 326 size_t size, const void *data,
@@ -416,7 +416,7 @@ request_cb (void *cls,
416 0, 416 0,
417 &sqm->query, 417 &sqm->query,
418 ntohl (sqm->type), 418 ntohl (sqm->type),
419 0 /* priority */, 419 0 /* priority */,
420 GSF_datastore_queue_size, 420 GSF_datastore_queue_size,
421 GNUNET_TIME_UNIT_FOREVER_REL, 421 GNUNET_TIME_UNIT_FOREVER_REL,
422 &handle_datastore_reply, sc); 422 &handle_datastore_reply, sc);
@@ -481,7 +481,7 @@ accept_cb (void *cls,
481 * 481 *
482 * @param cls NULL 482 * @param cls NULL
483 * @param tunnel tunnel of the disconnecting client 483 * @param tunnel tunnel of the disconnecting client
484 * @param tunnel_ctx our 'struct MeshClient' 484 * @param tunnel_ctx our 'struct MeshClient'
485 */ 485 */
486static void 486static void
487cleaner_cb (void *cls, 487cleaner_cb (void *cls,
@@ -501,9 +501,9 @@ cleaner_cb (void *cls,
501 gettext_noop ("# mesh connections active"), -1, 501 gettext_noop ("# mesh connections active"), -1,
502 GNUNET_NO); 502 GNUNET_NO);
503 if (GNUNET_SCHEDULER_NO_TASK != sc->terminate_task) 503 if (GNUNET_SCHEDULER_NO_TASK != sc->terminate_task)
504 GNUNET_SCHEDULER_cancel (sc->terminate_task); 504 GNUNET_SCHEDULER_cancel (sc->terminate_task);
505 if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task) 505 if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task)
506 GNUNET_SCHEDULER_cancel (sc->timeout_task); 506 GNUNET_SCHEDULER_cancel (sc->timeout_task);
507 if (NULL != sc->wh) 507 if (NULL != sc->wh)
508 GNUNET_MESH_notify_transmit_ready_cancel (sc->wh); 508 GNUNET_MESH_notify_transmit_ready_cancel (sc->wh);
509 if (NULL != sc->qe) 509 if (NULL != sc->qe)