aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 63c67b81c..2d6f40d58 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -201,7 +201,7 @@ struct GNUNET_ATS_Session
201 /** 201 /**
202 * Message stream tokenizer for incoming data 202 * Message stream tokenizer for incoming data
203 */ 203 */
204 struct GNUNET_SERVER_MessageStreamTokenizer *msg_tk; 204 struct GNUNET_MessageStreamTokenizer *msg_tk;
205 205
206 /** 206 /**
207 * Client recv handle 207 * Client recv handle
@@ -608,7 +608,7 @@ server_delete_session (struct GNUNET_ATS_Session *s)
608 } 608 }
609 if (NULL != s->msg_tk) 609 if (NULL != s->msg_tk)
610 { 610 {
611 GNUNET_SERVER_mst_destroy (s->msg_tk); 611 GNUNET_MST_destroy (s->msg_tk);
612 s->msg_tk = NULL; 612 s->msg_tk = NULL;
613 } 613 }
614 GNUNET_HELLO_address_free (s->address); 614 GNUNET_HELLO_address_free (s->address);
@@ -1621,13 +1621,11 @@ server_send_callback (void *cls,
1621 * Callback called by MessageStreamTokenizer when a message has arrived 1621 * Callback called by MessageStreamTokenizer when a message has arrived
1622 * 1622 *
1623 * @param cls current session as closure 1623 * @param cls current session as closure
1624 * @param client client
1625 * @param message the message to be forwarded to transport service 1624 * @param message the message to be forwarded to transport service
1626 * @return #GNUNET_OK 1625 * @return #GNUNET_OK
1627 */ 1626 */
1628static int 1627static int
1629server_receive_mst_cb (void *cls, 1628server_receive_mst_cb (void *cls,
1630 void *client,
1631 const struct GNUNET_MessageHeader *message) 1629 const struct GNUNET_MessageHeader *message)
1632{ 1630{
1633 struct GNUNET_ATS_Session *s = cls; 1631 struct GNUNET_ATS_Session *s = cls;
@@ -1847,13 +1845,16 @@ server_access_cb (void *cls,
1847 *upload_data_size); 1845 *upload_data_size);
1848 if (s->msg_tk == NULL) 1846 if (s->msg_tk == NULL)
1849 { 1847 {
1850 s->msg_tk = GNUNET_SERVER_mst_create (&server_receive_mst_cb, s); 1848 s->msg_tk = GNUNET_MST_create (&server_receive_mst_cb,
1849 s);
1851 } 1850 }
1852 GNUNET_SERVER_mst_receive (s->msg_tk, s, upload_data, *upload_data_size, 1851 GNUNET_MST_from_buffer (s->msg_tk,
1853 GNUNET_NO, GNUNET_NO); 1852 upload_data,
1853 *upload_data_size,
1854 GNUNET_NO, GNUNET_NO);
1854 server_mhd_connection_timeout (plugin, s, 1855 server_mhd_connection_timeout (plugin, s,
1855 GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us / 1000LL 1856 GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value_us / 1000LL
1856 / 1000LL); 1857 / 1000LL);
1857 (*upload_data_size) = 0; 1858 (*upload_data_size) = 0;
1858 } 1859 }
1859 else 1860 else
@@ -1935,7 +1936,7 @@ server_disconnect_cb (void *cls,
1935 sc->session->server_recv = NULL; 1936 sc->session->server_recv = NULL;
1936 if (NULL != sc->session->msg_tk) 1937 if (NULL != sc->session->msg_tk)
1937 { 1938 {
1938 GNUNET_SERVER_mst_destroy (sc->session->msg_tk); 1939 GNUNET_MST_destroy (sc->session->msg_tk);
1939 sc->session->msg_tk = NULL; 1940 sc->session->msg_tk = NULL;
1940 } 1941 }
1941 } 1942 }
@@ -2757,7 +2758,7 @@ server_start_report_addresses (struct HTTP_Server_Plugin *plugin)
2757 return; 2758 return;
2758 } 2759 }
2759 2760
2760 plugin->nat 2761 plugin->nat
2761 = GNUNET_NAT_register (plugin->env->cfg, 2762 = GNUNET_NAT_register (plugin->env->cfg,
2762 "transport-http_server", 2763 "transport-http_server",
2763 IPPROTO_TCP, 2764 IPPROTO_TCP,