View Issue Details

IDProjectCategoryView StatusLast Update
0003544GNUnetutil librarypublic2018-06-07 00:25
ReporteramatusAssigned ToChristian Grothoff 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product VersionSVN HEAD 
Target Version0.11.0pre66Fixed in Version0.11.0pre66 
Summary0003544: GNUNET_CLIENT_notify_transmit_ready documentation incorrect
DescriptionThe comment in src/util/client.c on GNUNET_CLIENT_notify_transmit_ready says that it "may call the notify method immediately" but it never will, assuming that "immediately" means before the call to GNUNET_CLIENT_notify_transmit_ready returns. GNUNET_CLIENT_notify_transmit_ready calls GNUNET_CONNECTION_notify_transmit_ready which has the same incorrect comment. The winding train of function calls eventually ends up at GNUNET_SCHEDULER_add_select or add_without_sets which both defer the callback until after they have returned.

If it did call the notify method before returning it would break code like this found in src/util/mq.c:
  state->th =
      GNUNET_CLIENT_notify_transmit_ready (state->connection, ntohs (msg->size),
                                           GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_NO,
                                           &connection_client_transmit_queued, mq);
  GNUNET_assert (NULL != state->th);
Where connection_client_transmit_queued executes state->th = NULL; before returning which would trigger the assert.
TagsNo tags attached.

Activities

Christian Grothoff

2014-09-21 11:30

manager   ~0008589

Fixed in 34299.

Issue History

Date Modified Username Field Change
2014-09-20 23:22 amatus New Issue
2014-09-20 23:22 amatus Assigned To => Christian Grothoff
2014-09-20 23:22 amatus Status new => assigned
2014-09-21 11:30 Christian Grothoff Note Added: 0008589
2014-09-21 11:30 Christian Grothoff Status assigned => resolved
2014-09-21 11:30 Christian Grothoff Fixed in Version => 0.11.0pre66
2014-09-21 11:30 Christian Grothoff Resolution open => fixed
2014-09-21 11:30 Christian Grothoff Target Version => 0.11.0pre66
2018-06-07 00:25 Christian Grothoff Status resolved => closed