- }
-
- size = ntohs (msg->size);
- type = ntohs (msg->type);
-
- if (type == GNUNET_MESSAGE_TYPE_GNS_LOOKUP_RESULT)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Got lookup msg\n");
- lookup_msg = (const struct GNUNET_GNS_ClientLookupResultMessage *) msg;
- r_id = ntohl (lookup_msg->id);
-
- if (r_id > handle->r_id)
- {
- /** no request found */
- GNUNET_break_op (0);
- GNUNET_CLIENT_receive (handle->client, &process_message, handle,
- GNUNET_TIME_UNIT_FOREVER_REL);
- }
-
- for (qe = handle->lookup_head; qe != NULL; qe = qe->next)
- {
- if (qe->r_id == r_id)
- break;
- }
- if (qe)
- process_lookup_reply(qe, lookup_msg);
-
-
- }
- else if (type == GNUNET_MESSAGE_TYPE_GNS_SHORTEN_RESULT)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Got SHORTEN_RESULT msg\n");
- shorten_msg = (struct GNUNET_GNS_ClientShortenResultMessage *) msg;
-
- r_id = ntohl (shorten_msg->id);
-
- if (r_id > handle->r_id)
- {
- /** no request found */
- GNUNET_break_op (0);
- GNUNET_CLIENT_receive (handle->client, &process_message, handle,
- GNUNET_TIME_UNIT_FOREVER_REL);
- }
-
- for (qe = handle->shorten_head; qe != NULL; qe = qe->next)
- {
- if (qe->r_id == r_id)
- break;
- }
- if (qe)
- process_shorten_reply(qe, shorten_msg);
- }
- else if (type == GNUNET_MESSAGE_TYPE_GNS_GET_AUTH_RESULT)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Got GET_AUTH_RESULT msg\n");
- get_auth_msg = (struct GNUNET_GNS_ClientGetAuthResultMessage *) msg;
-
- r_id = ntohl (get_auth_msg->id);
-
- if (r_id > handle->r_id)
- {
- /** no request found */
- GNUNET_break_op (0);
- GNUNET_CLIENT_receive (handle->client, &process_message, handle,
- GNUNET_TIME_UNIT_FOREVER_REL);
- }
-
- for (qe = handle->get_auth_head; qe != NULL; qe = qe->next)
- {
- if (qe->r_id == r_id)
- break;
- }
- if (qe)
- process_get_auth_reply(qe, get_auth_msg);
- }
-
- GNUNET_CLIENT_receive (handle->client, &process_message, handle,
- GNUNET_TIME_UNIT_FOREVER_REL);
-
- if (GNUNET_YES == handle->reconnect)
- force_reconnect (handle);
-