handle init NULL
authorChristian Grothoff <christian@grothoff.org>
Tue, 21 Dec 2010 13:46:45 +0000 (13:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 21 Dec 2010 13:46:45 +0000 (13:46 +0000)
src/core/core_api.c

index f73e1f29023c5af5497cdfd02db4ca84b11a4925..c727abc72fb11b5605dabb6a73471a10fbfb78e2 100644 (file)
@@ -859,14 +859,14 @@ main_notify_handler (void *cls,
          trigger_next_request (h, GNUNET_NO);
        }
       h->retry_backoff = GNUNET_TIME_UNIT_MILLISECONDS;
+      GNUNET_CRYPTO_hash (&m->publicKey,
+                         sizeof (struct
+                                 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+                         &h->me.hashPubKey);
       if (NULL != (init = h->init))
        {
          /* mark so we don't call init on reconnect */
          h->init = NULL;
-         GNUNET_CRYPTO_hash (&m->publicKey,
-                             sizeof (struct
-                                     GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
-                             &h->me.hashPubKey);
 #if DEBUG_CORE
          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                      "Connected to core service of peer `%s'.\n",