mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
completed working around strbuf_* bugs so that rhizome works again.
This commit is contained in:
parent
3164a76b1e
commit
f562a6361d
@ -369,6 +369,9 @@ int rhizome_queue_manifest_import(rhizome_manifest *m,
|
||||
close(sock);
|
||||
return -1;
|
||||
}
|
||||
#warning avoiding FORM_RHIZOME_DATASTORE_PATH corruption
|
||||
snprintf(filename,1024,"%s/import/file.%s",
|
||||
rhizome_datastore_path(),id);
|
||||
q->manifest->dataFileName = strdup(filename);
|
||||
q->file=fopen(filename,"w");
|
||||
if (!q->file) {
|
||||
@ -401,6 +404,9 @@ int rhizome_queue_manifest_import(rhizome_manifest *m,
|
||||
char filename[1024];
|
||||
if (!FORM_RHIZOME_DATASTORE_PATH(filename, "import/manifest.%s", id))
|
||||
return -1;
|
||||
#warning avoiding FORM_RHIZOME_DATASTORE_PATH corruption
|
||||
snprintf(filename,1024,"%s/import/manifest.%s",
|
||||
rhizome_datastore_path(),id);
|
||||
if (!rhizome_write_manifest_file(m, filename)) {
|
||||
rhizome_bundle_import(m, NULL, id,
|
||||
NULL /* no additional groups */,
|
||||
@ -521,6 +527,7 @@ int rhizome_fetch_poll()
|
||||
char filename[1024];
|
||||
if (!FORM_RHIZOME_DATASTORE_PATH(filename,"import/manifest.%s", id))
|
||||
return -1;
|
||||
#warning avoiding FORM_RHIZOME_DATASTORE_PATH bugs
|
||||
snprintf(filename,1024,"%s/manifest.%s",rhizome_datastore_path(),id);
|
||||
/* Do really write the manifest unchanged */
|
||||
if (debug&DEBUG_RHIZOME) {
|
||||
|
@ -287,8 +287,10 @@ int overlay_rhizome_add_advertisements(int interface_number,overlay_buffer *e)
|
||||
int overlay_rhizome_saw_advertisements(int i,overlay_frame *f, long long now)
|
||||
{
|
||||
if (!f) return -1;
|
||||
if (debug&DEBUG_RHIZOME) fprintf(stderr,"rhizome f->bytecount=%d\n",
|
||||
f->payload->length);
|
||||
if (debug&DEBUG_RHIZOME) {
|
||||
WHYF("rhizome f->bytecount=%d\n",f->payload->length);
|
||||
dump("payload",f->payload->bytes,f->payload->length);
|
||||
}
|
||||
|
||||
int ofs=0;
|
||||
int ad_frame_type=f->payload->bytes[ofs++];
|
||||
|
Loading…
Reference in New Issue
Block a user