diff --git a/core/bootstrap.c b/core/bootstrap.c index 8f13279..5594b73 100644 --- a/core/bootstrap.c +++ b/core/bootstrap.c @@ -40,5 +40,5 @@ void *ipfs_bootstrap_swarm(void* param) { void *ipfs_bootstrap_routing(void* param) { struct IpfsNode* local_node = (struct IpfsNode*)param; local_node->routing = ipfs_routing_new_kademlia(local_node, &local_node->identity->private_key, NULL); - return NULL; + return (void*)2; } diff --git a/merkledag/node.c b/merkledag/node.c index ca289fa..5408010 100644 --- a/merkledag/node.c +++ b/merkledag/node.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "inttypes.h" #include "mh/multihash.h" @@ -684,7 +685,7 @@ int Node_Resolve_Max_Size(char * input1) { return -1; // Input is null, therefor nothing can be processed. } - char input[strlen(input1)]; + char input[strlen(input1)+1]; bzero(input, strlen(input1)); strcpy(input, input1); int num = 0; @@ -712,7 +713,7 @@ int Node_Resolve(char ** result, char * input1) { return 0; // Input is null, therefor nothing can be processed. } - char input[strlen(input1)]; + char input[strlen(input1)+1]; bzero(input, strlen(input1)); strcpy(input, input1); char * tr; @@ -789,7 +790,7 @@ int Node_Tree(char * result, char * input1) //I don't know where you use this bu { return 0; } - char input[strlen(input1)]; + char input[strlen(input1)+1]; bzero(input, strlen(input1)); strcpy(input, input1); for(int i=0; irouting->Provide(ipfs_node->routing, (char*)write_node->hash, write_node->hash_size)) goto exit; @@ -138,7 +137,9 @@ int test_routing_supernode_get_value() { if (!ipfs_node_protobuf_decode(results, results_size, &node)) goto exit; - //TODO: see if we got it + //we got it + if (node->data_size != write_node->data_size) + goto exit; retVal = 1; exit: