diff options
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r-- | src/transport/plugin_transport_unix.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 7e2601aed..460869181 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -218,7 +218,7 @@ struct Session | |||
218 | /** | 218 | /** |
219 | * Session timeout task. | 219 | * Session timeout task. |
220 | */ | 220 | */ |
221 | GNUNET_SCHEDULER_TaskIdentifier timeout_task; | 221 | struct GNUNET_SCHEDULER_Task * timeout_task; |
222 | 222 | ||
223 | /** | 223 | /** |
224 | * Number of messages we currently have in our write queue. | 224 | * Number of messages we currently have in our write queue. |
@@ -255,17 +255,17 @@ struct Plugin | |||
255 | /** | 255 | /** |
256 | * ID of task used to update our addresses when one expires. | 256 | * ID of task used to update our addresses when one expires. |
257 | */ | 257 | */ |
258 | GNUNET_SCHEDULER_TaskIdentifier address_update_task; | 258 | struct GNUNET_SCHEDULER_Task * address_update_task; |
259 | 259 | ||
260 | /** | 260 | /** |
261 | * ID of read task | 261 | * ID of read task |
262 | */ | 262 | */ |
263 | GNUNET_SCHEDULER_TaskIdentifier read_task; | 263 | struct GNUNET_SCHEDULER_Task * read_task; |
264 | 264 | ||
265 | /** | 265 | /** |
266 | * ID of write task | 266 | * ID of write task |
267 | */ | 267 | */ |
268 | GNUNET_SCHEDULER_TaskIdentifier write_task; | 268 | struct GNUNET_SCHEDULER_Task * write_task; |
269 | 269 | ||
270 | /** | 270 | /** |
271 | * Number of bytes we currently have in our write queues. | 271 | * Number of bytes we currently have in our write queues. |
@@ -482,10 +482,10 @@ unix_plugin_session_disconnect (void *cls, | |||
482 | "# UNIX sessions active", | 482 | "# UNIX sessions active", |
483 | GNUNET_CONTAINER_multipeermap_size (plugin->session_map), | 483 | GNUNET_CONTAINER_multipeermap_size (plugin->session_map), |
484 | GNUNET_NO); | 484 | GNUNET_NO); |
485 | if (GNUNET_SCHEDULER_NO_TASK != session->timeout_task) | 485 | if (NULL != session->timeout_task) |
486 | { | 486 | { |
487 | GNUNET_SCHEDULER_cancel (session->timeout_task); | 487 | GNUNET_SCHEDULER_cancel (session->timeout_task); |
488 | session->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 488 | session->timeout_task = NULL; |
489 | session->timeout = GNUNET_TIME_UNIT_ZERO_ABS; | 489 | session->timeout = GNUNET_TIME_UNIT_ZERO_ABS; |
490 | } | 490 | } |
491 | notify_session_monitor (plugin, | 491 | notify_session_monitor (plugin, |
@@ -512,7 +512,7 @@ session_timeout (void *cls, | |||
512 | struct Session *session = cls; | 512 | struct Session *session = cls; |
513 | struct GNUNET_TIME_Relative left; | 513 | struct GNUNET_TIME_Relative left; |
514 | 514 | ||
515 | session->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 515 | session->timeout_task = NULL; |
516 | left = GNUNET_TIME_absolute_get_remaining (session->timeout); | 516 | left = GNUNET_TIME_absolute_get_remaining (session->timeout); |
517 | if (0 != left.rel_value_us) | 517 | if (0 != left.rel_value_us) |
518 | { | 518 | { |
@@ -545,7 +545,7 @@ session_timeout (void *cls, | |||
545 | static void | 545 | static void |
546 | reschedule_session_timeout (struct Session *session) | 546 | reschedule_session_timeout (struct Session *session) |
547 | { | 547 | { |
548 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != session->timeout_task); | 548 | GNUNET_assert (NULL != session->timeout_task); |
549 | session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 549 | session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
550 | } | 550 | } |
551 | 551 | ||
@@ -1226,7 +1226,7 @@ unix_plugin_select_read (void *cls, | |||
1226 | { | 1226 | { |
1227 | struct Plugin *plugin = cls; | 1227 | struct Plugin *plugin = cls; |
1228 | 1228 | ||
1229 | plugin->read_task = GNUNET_SCHEDULER_NO_TASK; | 1229 | plugin->read_task = NULL; |
1230 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1230 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1231 | return; | 1231 | return; |
1232 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) | 1232 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_READ_READY)) |
@@ -1251,7 +1251,7 @@ unix_plugin_select_write (void *cls, | |||
1251 | { | 1251 | { |
1252 | struct Plugin *plugin = cls; | 1252 | struct Plugin *plugin = cls; |
1253 | 1253 | ||
1254 | plugin->write_task = GNUNET_SCHEDULER_NO_TASK; | 1254 | plugin->write_task = NULL; |
1255 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1255 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1256 | return; | 1256 | return; |
1257 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) | 1257 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY)) |
@@ -1358,7 +1358,7 @@ unix_plugin_send (void *cls, | |||
1358 | notify_session_monitor (plugin, | 1358 | notify_session_monitor (plugin, |
1359 | session, | 1359 | session, |
1360 | GNUNET_TRANSPORT_SS_UPDATE); | 1360 | GNUNET_TRANSPORT_SS_UPDATE); |
1361 | if (GNUNET_SCHEDULER_NO_TASK == plugin->write_task) | 1361 | if (NULL == plugin->write_task) |
1362 | plugin->write_task = | 1362 | plugin->write_task = |
1363 | GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, | 1363 | GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, |
1364 | plugin->unix_sock.desc, | 1364 | plugin->unix_sock.desc, |
@@ -1629,7 +1629,7 @@ address_notification (void *cls, | |||
1629 | unix_path = (char *) &ua[1]; | 1629 | unix_path = (char *) &ua[1]; |
1630 | memcpy (unix_path, plugin->unix_socket_path, strlen (plugin->unix_socket_path) + 1); | 1630 | memcpy (unix_path, plugin->unix_socket_path, strlen (plugin->unix_socket_path) + 1); |
1631 | 1631 | ||
1632 | plugin->address_update_task = GNUNET_SCHEDULER_NO_TASK; | 1632 | plugin->address_update_task = NULL; |
1633 | address = GNUNET_HELLO_address_allocate (plugin->env->my_identity, | 1633 | address = GNUNET_HELLO_address_allocate (plugin->env->my_identity, |
1634 | PLUGIN_NAME, | 1634 | PLUGIN_NAME, |
1635 | ua, | 1635 | ua, |
@@ -1886,20 +1886,20 @@ libgnunet_plugin_transport_unix_done (void *cls) | |||
1886 | GNUNET_free (msgw); | 1886 | GNUNET_free (msgw); |
1887 | } | 1887 | } |
1888 | 1888 | ||
1889 | if (GNUNET_SCHEDULER_NO_TASK != plugin->read_task) | 1889 | if (NULL != plugin->read_task) |
1890 | { | 1890 | { |
1891 | GNUNET_SCHEDULER_cancel (plugin->read_task); | 1891 | GNUNET_SCHEDULER_cancel (plugin->read_task); |
1892 | plugin->read_task = GNUNET_SCHEDULER_NO_TASK; | 1892 | plugin->read_task = NULL; |
1893 | } | 1893 | } |
1894 | if (GNUNET_SCHEDULER_NO_TASK != plugin->write_task) | 1894 | if (NULL != plugin->write_task) |
1895 | { | 1895 | { |
1896 | GNUNET_SCHEDULER_cancel (plugin->write_task); | 1896 | GNUNET_SCHEDULER_cancel (plugin->write_task); |
1897 | plugin->write_task = GNUNET_SCHEDULER_NO_TASK; | 1897 | plugin->write_task = NULL; |
1898 | } | 1898 | } |
1899 | if (GNUNET_SCHEDULER_NO_TASK != plugin->address_update_task) | 1899 | if (NULL != plugin->address_update_task) |
1900 | { | 1900 | { |
1901 | GNUNET_SCHEDULER_cancel (plugin->address_update_task); | 1901 | GNUNET_SCHEDULER_cancel (plugin->address_update_task); |
1902 | plugin->address_update_task = GNUNET_SCHEDULER_NO_TASK; | 1902 | plugin->address_update_task = NULL; |
1903 | } | 1903 | } |
1904 | if (NULL != plugin->unix_sock.desc) | 1904 | if (NULL != plugin->unix_sock.desc) |
1905 | { | 1905 | { |