-/**
- * Method called to with the ego we are to use for shortening
- * during the lookup.
- *
- * @param cls closure contains the public key to use
- * @param ego ego handle, NULL if not found
- * @param ctx context for application to store data for this ego
- * (during the lifetime of this process, initially NULL)
- * @param name name assigned by the user for this ego,
- * NULL if the user just deleted the ego and it
- * must thus no longer be used
- */
-static void
-identity_shorten_cb (void *cls,
- struct GNUNET_IDENTITY_Ego *ego,
- void **ctx,
- const char *name)
-{
- struct LookupHandle *handle = cls;
-
- handle->id_op = NULL;
- if (NULL == ego)
- lookup_with_keys (handle, NULL);
- else
- lookup_with_keys (handle,
- GNUNET_IDENTITY_ego_get_private_key (ego));
-}
-
-/**
- * Perform the actual resolution, starting with the zone
- * identified by the given public key.
- *
- * @param pkey public key to use for the zone
- */
-static void
-lookup_with_public_key (struct LookupHandle *handle)
-{
- handle->pkeym = handle->pkey;
- GNUNET_break (NULL == handle->id_op);
- handle->id_op = GNUNET_IDENTITY_get (handle->identity,
- "gns-short",
- &identity_shorten_cb,
- handle);
- if (NULL == handle->id_op)
- {
- GNUNET_break (0);
- lookup_with_keys (handle, NULL);
- }
-}