diff --git a/include/libp2p/record/message.h b/include/libp2p/record/message.h new file mode 100644 index 0000000..5a56cda --- /dev/null +++ b/include/libp2p/record/message.h @@ -0,0 +1,12 @@ +#pragma once + +/** + * protobuf stuff for Message and Peer + * This is used for the KAD / DHT stuff + */ + +struct Libp2pPeer { + char* id; + size_t id_size; + +}; diff --git a/record/record.c b/record/record.c index 55bddc5..b6c8931 100644 --- a/record/record.c +++ b/record/record.c @@ -199,7 +199,7 @@ int libp2p_record_make_put_record (char** record_buf, size_t *rec_size, const st free(bytes); if (sign_buf != NULL) free(sign_buf); - if (retVal == 0) { + if (retVal = -1) { free(*record_buf); *record_buf = NULL; }