From: Bart Polot Date: Mon, 19 Sep 2011 19:37:00 +0000 (+0000) Subject: Fixed use before initialization X-Git-Tag: initial-import-from-subversion-38251~17010 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4a117db4fab2f00b667c8f5a76ef1eedae9908dd;p=oweals%2Fgnunet.git Fixed use before initialization --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 966b7c097..565db893f 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -3529,10 +3529,6 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, GNUNET_CRYPTO_hash (&my_public_key, sizeof (my_public_key), &my_full_id.hashPubKey); myid = GNUNET_PEER_intern (&my_full_id); - /* Create a peer_info for the local peer */ - peer_info_get(&my_full_id); - - announce_id_task = GNUNET_SCHEDULER_add_now (&announce_id, cls); dht_handle = GNUNET_DHT_connect (c, 64); if (dht_handle == NULL) @@ -3566,6 +3562,10 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, #endif announce_applications_task = GNUNET_SCHEDULER_NO_TASK; + announce_id_task = GNUNET_SCHEDULER_add_now (&announce_id, cls); + + /* Create a peer_info for the local peer */ + peer_info_get(&my_full_id); /* Scheduled the task to clean up when shutdown is called */ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task,