View Issue Details

IDProjectCategoryView StatusLast Update
0003544GNUnetutil librarypublic2018-06-06 22:25
Reporteramatus Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product VersionGit master 
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 09:30

manager   ~0008589

Fixed in 34299.

Issue History

Date ModifiedUsernameFieldChange
2014-09-20 21:22amatusNew Issue
2014-09-20 21:22amatusAssigned To => Christian Grothoff
2014-09-20 21:22amatusStatusnew => assigned
2014-09-21 09:30Christian GrothoffNote Added: 0008589
2014-09-21 09:30Christian GrothoffStatusassigned => resolved
2014-09-21 09:30Christian GrothoffFixed in Version => 0.11.0pre66
2014-09-21 09:30Christian GrothoffResolutionopen => fixed
2014-09-21 09:30Christian GrothoffTarget Version => 0.11.0pre66
2018-06-06 22:25Christian GrothoffStatusresolved => closed