minor fixes

yamux
John Jones 2017-03-21 12:11:41 -05:00
parent 8edc94509c
commit 83242b0046
3 changed files with 9 additions and 7 deletions

View File

@ -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;
}

View File

@ -5,6 +5,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#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; i<strlen(input); i++)

View File

@ -52,7 +52,6 @@ int test_routing_supernode_get_value() {
struct Stream* stream = NULL;
int file_size = 1000;
unsigned char bytes[file_size];
//char* fileName = "temp_file.bin";
char* fullFileName = "/tmp/temp_file.bin";
struct Node* write_node = NULL;
size_t bytes_written = 0;
@ -97,7 +96,7 @@ int test_routing_supernode_get_value() {
goto exit;
}
// TODO: announce to network that this can be provided
// announce to network that this can be provided
if (!ipfs_node->routing->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: