View Issue Details

IDProjectCategoryView StatusLast Update
0001822GNUnetutil librarypublic2011-10-31 11:00
Reportervminko Assigned Tovminko Due Date
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Summary0001822: New API call to delete a TransmitContext
DescriptionWe need to have a way to delete a TransmitContext in case of an error between
GNUNET_SERVER_transmit_context_append_data and
GNUNET_SERVER_transmit_context_run.

The proposed fix is attached.
Additional InformationRelated discussion on the forum: https://gnunet.org/node/1363
TagsNo tags attached.
Attached Files
gnunet-svn@17235-tc_destroy.patch (1,317 bytes)   
Index: src/include/gnunet_server_lib.h
===================================================================
--- src/include/gnunet_server_lib.h	(revision 17235)
+++ src/include/gnunet_server_lib.h	(working copy)
@@ -476,7 +476,16 @@
                                     struct GNUNET_TIME_Relative timeout);
 
 
+/**
+ * Destroy a transmission context.
+ *
+ * @param tc transmission context to destroy
+ */
+void
+GNUNET_SERVER_transmit_context_destroy (struct GNUNET_SERVER_TransmitContext
+                                        *tc);
 
+
 /**
  * The notification context is the key datastructure for a conveniance
  * API used for transmission of notifications to the client until the
Index: src/util/server_tc.c
===================================================================
--- src/util/server_tc.c	(revision 17235)
+++ src/util/server_tc.c	(working copy)
@@ -226,4 +226,21 @@
   }
 }
 
+
+/**
+ * Destroy a transmission context.
+ *
+ * @param tc transmission context to destroy
+ */
+void
+GNUNET_SERVER_transmit_context_destroy (struct GNUNET_SERVER_TransmitContext
+                                        *tc)
+{
+  GNUNET_SERVER_receive_done (tc->client, GNUNET_OK);
+  GNUNET_SERVER_client_drop (tc->client);
+  GNUNET_free_non_null (tc->buf);
+  GNUNET_free (tc);
+}
+
+
 /* end of server_tc.c */

Activities

Christian Grothoff

2011-10-06 08:58

manager   ~0004692

Applied (with slight modifications) as SVN 17240.

Issue History

Date ModifiedUsernameFieldChange
2011-10-06 07:30vminkoNew Issue
2011-10-06 07:30vminkoFile Added: gnunet-svn@17235-tc_destroy.patch
2011-10-06 07:33vminkoFile Deleted: gnunet-svn@17235-tc_destroy.patch
2011-10-06 07:34vminkoFile Added: gnunet-svn@17235-tc_destroy.patch
2011-10-06 08:58Christian GrothoffNote Added: 0004692
2011-10-06 08:58Christian GrothoffStatusnew => resolved
2011-10-06 08:58Christian GrothoffFixed in Version => Git master
2011-10-06 08:58Christian GrothoffResolutionopen => fixed
2011-10-06 08:58Christian GrothoffAssigned To => Christian Grothoff
2011-10-06 08:58Christian GrothoffAssigned ToChristian Grothoff => vminko
2011-10-06 08:58Christian GrothoffFixed in VersionGit master => 0.9.0pre4
2011-10-06 08:58Christian GrothoffTarget Version => 0.9.0pre4
2011-10-31 11:00Christian GrothoffStatusresolved => closed