/**
* The identity of this host.
*/
-static const struct GNUNET_PeerIdentity *me;
+static struct GNUNET_PeerIdentity me;
/**
* Head of the list of current clients.
struct ConnectedPeer *cp;
struct GNUNET_CORE_TransmitHandle *th;
- if (0 == memcmp (peer, me, sizeof (struct GNUNET_PeerIdentity)))
+ if (0 == memcmp (peer, &me, sizeof (struct GNUNET_PeerIdentity)))
return;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer connected: %s\n",
GNUNET_i2s (peer));
peer_disconnect_handler (void *cls, const struct GNUNET_PeerIdentity *peer)
{
- if (0 == memcmp (peer, me, sizeof (struct GNUNET_PeerIdentity)))
+ if (0 == memcmp (peer, &me, sizeof (struct GNUNET_PeerIdentity)))
return;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Peer disconnected: %s\n",
GNUNET_i2s (peer));
const struct GNUNET_PeerIdentity *my_identity)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Core initialized\n");
- me = my_identity;
+ me = *my_identity;
}