- cp->migration_pth
- = GSF_peer_transmit_ (cp,
- GNUNET_SYSERR,
- UINT32_MAX,
- GNUNET_TIME_UNIT_FOREVER_REL,
- sizeof (struct MigrationStopMessage),
- &create_migration_stop_message,
- cp);
-}
-
-
-/**
- * Write host-trust information to a file - flush the buffer entry!
- *
- * @param cls closure, not used
- * @param key host identity
- * @param value the 'struct GSF_ConnectedPeer' to flush
- * @return GNUNET_OK to continue iteration
- */
-static int
-flush_trust (void *cls,
- const GNUNET_HashCode *key,
- void *value)
-{
- struct GSF_ConnectedPeer *cp = value;
- char *fn;
- uint32_t trust;
- struct GNUNET_PeerIdentity pid;
-
- if (cp->ppd.trust == cp->disk_trust)
- return GNUNET_OK; /* unchanged */
- GNUNET_assert (0 != cp->ppd.pid);
- GNUNET_PEER_resolve (cp->ppd.pid,
- &pid);
- fn = get_trust_filename (&pid);
- if (cp->ppd.trust == 0)
- {
- if ((0 != UNLINK (fn)) && (errno != ENOENT))
- GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING |
- GNUNET_ERROR_TYPE_BULK, "unlink", fn);
- }
- else
- {
- trust = htonl (cp->ppd.trust);
- if (sizeof(uint32_t) == GNUNET_DISK_fn_write (fn, &trust,
- sizeof(uint32_t),
- GNUNET_DISK_PERM_USER_READ | GNUNET_DISK_PERM_USER_WRITE
- | GNUNET_DISK_PERM_GROUP_READ | GNUNET_DISK_PERM_OTHER_READ))
- cp->disk_trust = cp->ppd.trust;
- }
- GNUNET_free (fn);
- return GNUNET_OK;
+ cp->migration_pth =
+ GSF_peer_transmit_ (cp, GNUNET_SYSERR, UINT32_MAX,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ sizeof (struct MigrationStopMessage),
+ &create_migration_stop_message, cp);