aboutsummaryrefslogtreecommitdiff
path: root/src/stream
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-22 15:49:49 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-22 15:49:49 +0000
commitc2d88b4c711713ee4d5511cb30142aa4c7738548 (patch)
treef2d6c6059e12ed80ef0ec2276d383e8f566b2de4 /src/stream
parent71896114a4f9c2bd7eb1c3f67cc7ba23d6522152 (diff)
downloadgnunet-c2d88b4c711713ee4d5511cb30142aa4c7738548.tar.gz
gnunet-c2d88b4c711713ee4d5511cb30142aa4c7738548.zip
starting to use stream in fs
Diffstat (limited to 'src/stream')
-rw-r--r--src/stream/stream_api.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/stream/stream_api.c b/src/stream/stream_api.c
index fd2f86e51..46f7abb47 100644
--- a/src/stream/stream_api.c
+++ b/src/stream/stream_api.c
@@ -34,7 +34,6 @@
34 * @author Sree Harsha Totakura 34 * @author Sree Harsha Totakura
35 */ 35 */
36 36
37
38#include "platform.h" 37#include "platform.h"
39#include "gnunet_common.h" 38#include "gnunet_common.h"
40#include "gnunet_crypto_lib.h" 39#include "gnunet_crypto_lib.h"
@@ -1918,6 +1917,8 @@ handle_receive_close (struct GNUNET_STREAM_Socket *socket,
1918 that that stream has been shutdown */ 1917 that that stream has been shutdown */
1919 if (NULL != socket->write_handle) 1918 if (NULL != socket->write_handle)
1920 { 1919 {
1920 // FIXME: this breaks if 'write_cont' decides to
1921 // call SOCKET_close!
1921 if (NULL != socket->write_handle->write_cont) 1922 if (NULL != socket->write_handle->write_cont)
1922 socket->write_handle->write_cont (socket->write_handle->write_cont_cls, 1923 socket->write_handle->write_cont (socket->write_handle->write_cont_cls,
1923 GNUNET_STREAM_SHUTDOWN, 0); 1924 GNUNET_STREAM_SHUTDOWN, 0);
@@ -2040,6 +2041,8 @@ handle_close (struct GNUNET_STREAM_Socket *socket,
2040 that that stream has been shutdown */ 2041 that that stream has been shutdown */
2041 if (NULL != socket->write_handle) 2042 if (NULL != socket->write_handle)
2042 { 2043 {
2044 // FIXME: this breaks if 'write_cont' decides to
2045 // call SOCKET_close!
2043 if (NULL != socket->write_handle->write_cont) 2046 if (NULL != socket->write_handle->write_cont)
2044 socket->write_handle->write_cont (socket->write_handle->write_cont_cls, 2047 socket->write_handle->write_cont (socket->write_handle->write_cont_cls,
2045 GNUNET_STREAM_SHUTDOWN, 0); 2048 GNUNET_STREAM_SHUTDOWN, 0);
@@ -3543,11 +3546,11 @@ GNUNET_STREAM_read (struct GNUNET_STREAM_Socket *socket,
3543 case STATE_RECEIVE_CLOSE_WAIT: 3546 case STATE_RECEIVE_CLOSE_WAIT:
3544 case STATE_CLOSED: 3547 case STATE_CLOSED:
3545 case STATE_CLOSE_WAIT: 3548 case STATE_CLOSE_WAIT:
3546 proc (proc_cls, GNUNET_STREAM_SHUTDOWN, NULL, 0);
3547 LOG (GNUNET_ERROR_TYPE_DEBUG, 3549 LOG (GNUNET_ERROR_TYPE_DEBUG,
3548 "%s: %s() END\n", 3550 "%s: %s() END\n",
3549 GNUNET_i2s (&socket->other_peer), 3551 GNUNET_i2s (&socket->other_peer),
3550 __func__); 3552 __func__);
3553 proc (proc_cls, GNUNET_STREAM_SHUTDOWN, NULL, 0);
3551 return NULL; 3554 return NULL;
3552 default: 3555 default:
3553 break; 3556 break;