diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-07-07 20:05:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-07-07 20:05:55 +0000 |
commit | 120afa6058ba579887a9b417ec86cf06926d765e (patch) | |
tree | 5b18b972f3bc1934cbc35956cf24e07de27507f6 /src/peerinfo | |
parent | ffb59a6a7fca6e70abfe5b87a997ed9cad989ec5 (diff) | |
download | gnunet-120afa6058ba579887a9b417ec86cf06926d765e.tar.gz gnunet-120afa6058ba579887a9b417ec86cf06926d765e.zip |
fixing issues with hello handling
Diffstat (limited to 'src/peerinfo')
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index eb2dc4264..44ace5736 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -371,9 +371,11 @@ bind_address (const struct GNUNET_PeerIdentity *peer, | |||
371 | host->hello = mrg; | 371 | host->hello = mrg; |
372 | } | 372 | } |
373 | fn = get_host_filename (peer); | 373 | fn = get_host_filename (peer); |
374 | GNUNET_DISK_fn_write (fn, host->hello, GNUNET_HELLO_size (hello), | 374 | GNUNET_DISK_fn_write (fn, |
375 | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE | 375 | host->hello, |
376 | | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ); | 376 | GNUNET_HELLO_size (host->hello), |
377 | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE | ||
378 | | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ); | ||
377 | GNUNET_free (fn); | 379 | GNUNET_free (fn); |
378 | } | 380 | } |
379 | 381 | ||
@@ -516,9 +518,11 @@ discard_hosts_helper (void *cls, const char *fn) | |||
516 | GNUNET_ERROR_TYPE_BULK, "unlink", fn); | 518 | GNUNET_ERROR_TYPE_BULK, "unlink", fn); |
517 | if (new_hello != NULL) | 519 | if (new_hello != NULL) |
518 | { | 520 | { |
519 | GNUNET_DISK_fn_write (fn, new_hello, GNUNET_HELLO_size (new_hello), | 521 | GNUNET_DISK_fn_write (fn, |
520 | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE | 522 | new_hello, |
521 | | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ); | 523 | GNUNET_HELLO_size (new_hello), |
524 | GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE | ||
525 | | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ); | ||
522 | GNUNET_free (new_hello); | 526 | GNUNET_free (new_hello); |
523 | } | 527 | } |
524 | return GNUNET_OK; | 528 | return GNUNET_OK; |