+/**
+ * Write peer-respect information to a file - flush the buffer entry!
+ *
+ * @param cls unused
+ * @param key peer identity
+ * @param value the `struct GSF_ConnectedPeer` to flush
+ * @return #GNUNET_OK to continue iteration
+ */
+static int
+flush_respect (void *cls,
+ const struct GNUNET_PeerIdentity *key,
+ void *value)
+{
+ struct GSF_ConnectedPeer *cp = value;
+ struct GNUNET_PeerIdentity pid;
+
+ if (cp->ppd.respect == cp->disk_respect)
+ return GNUNET_OK; /* unchanged */
+ GNUNET_assert (0 != cp->ppd.pid);
+ GNUNET_PEER_resolve (cp->ppd.pid, &pid);
+ GNUNET_PEERSTORE_store (peerstore, "fs", &pid, "respect", &cp->ppd.respect,
+ sizeof (cp->ppd.respect),
+ GNUNET_TIME_UNIT_FOREVER_ABS,
+ GNUNET_PEERSTORE_STOREOPTION_REPLACE, NULL, NULL);
+ return GNUNET_OK;
+}
+
+