CONFIG = $DEFAULTCONFIG
BINARY = gnunet-service-gns
UNIXPATH = /tmp/gnunet-service-gns.sock
-ZONEKEY_DIRECTORY = $SERVICEHOME/gns
-ZONEKEY = $ZONEKEY_DIRECTORY/zonekey.zkey
+ZONEKEY = $SERVICEHOME/gns/zonekey.zkey
HIJACK_DNS = NO
[fcfsd]
"Received shortened reply `%s' from GNS service\n",
short_name);
+ GNUNET_CLIENT_receive (h->client, &process_message, h,
+ GNUNET_TIME_UNIT_FOREVER_REL);
qe->shorten_proc(qe->proc_cls, short_name);
}
"Received GET_AUTH reply `%s' from GNS service\n",
auth_name);
+ GNUNET_CLIENT_receive (h->client, &process_message, h,
+ GNUNET_TIME_UNIT_FOREVER_REL);
qe->auth_proc(qe->proc_cls, auth_name);
}
"Received lookup reply from GNS service (count=%d)\n",
ntohl(msg->rd_count));
+ GNUNET_CLIENT_receive (h->client, &process_message, h,
+ GNUNET_TIME_UNIT_FOREVER_REL);
qe->lookup_proc(qe->proc_cls, rd_count, rd);
}
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);
struct GNUNET_GNS_Handle *handle;
handle = GNUNET_malloc (sizeof (struct GNUNET_GNS_Handle));
+ handle->reconnect = GNUNET_NO;
handle->cfg = cfg;
reconnect (handle);
//handle->reconnect_task = GNUNET_SCHEDULER_add_now (&reconnect_task, handle);
+ handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
handle->r_id = 0;
handle->in_receive = GNUNET_NO;
return handle;
GNUNET_SCHEDULER_cancel (h->reconnect_task);
h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
}
- GNUNET_free(h);
+ //GNUNET_free(h);
/* disco from GNS */
}
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Initializing GNS\n");
-
+
char* keyfile;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
{&handle_get_authority, NULL, GNUNET_MESSAGE_TYPE_GNS_GET_AUTH, 0}
};
- if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (c, "gns",
+ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (c, "gns",
"ZONEKEY", &keyfile))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "No private key for root zone specified%s!\n", keyfile);
+ "No private key for root zone specified!\n");
GNUNET_SCHEDULER_shutdown(0);
return;
}
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
+ "Using keyfile %s for root zone.\n", keyfile);
+
zone_key = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
GNUNET_CRYPTO_rsa_key_get_public (zone_key, &pkey);
* tries to look up the dns record for TEST_DOMAIN
*/
static void
-commence_testing (void *cls, int32_t success, const char *emsg)
+commence_testing (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_NAMESTORE_disconnect(namestore_handle, GNUNET_YES);
nrb->public_key = bob_pkey;
nrb->rd_count = htonl(1);
memset(&nrb[1], 0, strlen(TEST_RECORD_NAME) + 1);
- strcpy(&nrb[1], TEST_RECORD_NAME);
+ strcpy((char*)&nrb[1], TEST_RECORD_NAME);
nrb_data = (char*)&nrb[1];
nrb_data += strlen(TEST_RECORD_NAME) + 1;
return;
}
- if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "gns",
+ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
"ZONEKEY",
&alice_keyfile))
{
return;
}
- if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "gns",
+ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
"ZONEKEY",
&alice_keyfile))
{
return;
}
- if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "gns",
+ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
"ZONEKEY",
&alice_keyfile))
{
#PREFIX = valgrind -v --leak-check=full --track-origins=yes
AUTOSTART = YES
BINARY = gnunet-service-gns
-ZONEKEY = zonekey
+ZONEKEY = $SERVICEHOME/gns/zonekey.zkey
HIJACK_DNS = NO
UNIXPATH = /tmp/gnunet-service-gns.sock
HOME = $SERVICEHOME