From dc1b8b6b3d6866f45e1ad9e0ba753e5200840508 Mon Sep 17 00:00:00 2001 From: John Jones Date: Mon, 13 Mar 2017 08:53:20 -0500 Subject: [PATCH] Minor mod to Libp2pLinkedList --- include/libp2p/utils/linked_list.h | 2 +- test/test_multistream.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/libp2p/utils/linked_list.h b/include/libp2p/utils/linked_list.h index 8ae47c5..c18caa8 100644 --- a/include/libp2p/utils/linked_list.h +++ b/include/libp2p/utils/linked_list.h @@ -2,7 +2,7 @@ struct Libp2pLinkedList { void* item; - void* next; + struct Libp2pLinkedList* next; }; /*** diff --git a/test/test_multistream.h b/test/test_multistream.h index a57ec02..64c0704 100644 --- a/test/test_multistream.h +++ b/test/test_multistream.h @@ -28,18 +28,20 @@ int test_multistream_get_list() { size_t response_size; char* filtered = NULL; - struct Stream* stream = libp2p_net_multistream_connect("www.jmjatlanta.com", 4001); - if (*((int*)stream->socket_descriptor) < 0) + struct SecureSession session; + session.insecure_stream = libp2p_net_multistream_connect("104.131.131.82", 4001); + + if (*((int*)session.insecure_stream->socket_descriptor) < 0) goto exit; // try to respond something, ls command const unsigned char* out = "ls\n"; - if (libp2p_net_multistream_write(stream, out, strlen((char*)out)) <= 0) + if (libp2p_net_multistream_write(&session, out, strlen((char*)out)) <= 0) goto exit; // retrieve response - retVal = libp2p_net_multistream_read(stream, &response, &response_size); + retVal = libp2p_net_multistream_read(&session, &response, &response_size); if (retVal <= 0) goto exit;