View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001822 | GNUnet | util library | public | 2011-10-06 09:30 | 2011-10-31 12:00 |
| Reporter | vminko | Assigned To | vminko | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | Git master | ||||
| Summary | 0001822: New API call to delete a TransmitContext | ||||
| Description | We 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 Information | Related discussion on the forum: https://gnunet.org/node/1363 | ||||
| Tags | No 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 */
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2011-10-06 09:30 | vminko | New Issue | |
| 2011-10-06 09:30 | vminko | File Added: gnunet-svn@17235-tc_destroy.patch | |
| 2011-10-06 09:33 | vminko | File Deleted: gnunet-svn@17235-tc_destroy.patch | |
| 2011-10-06 09:34 | vminko | File Added: gnunet-svn@17235-tc_destroy.patch | |
| 2011-10-06 10:58 | Christian Grothoff | Note Added: 0004692 | |
| 2011-10-06 10:58 | Christian Grothoff | Status | new => resolved |
| 2011-10-06 10:58 | Christian Grothoff | Fixed in Version | => Git master |
| 2011-10-06 10:58 | Christian Grothoff | Resolution | open => fixed |
| 2011-10-06 10:58 | Christian Grothoff | Assigned To | => Christian Grothoff |
| 2011-10-06 10:58 | Christian Grothoff | Assigned To | Christian Grothoff => vminko |
| 2011-10-06 10:58 | Christian Grothoff | Fixed in Version | Git master => 0.9.0pre4 |
| 2011-10-06 10:58 | Christian Grothoff | Target Version | => 0.9.0pre4 |
| 2011-10-31 12:00 | Christian Grothoff | Status | resolved => closed |