gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r5900 - in GNUnet: . src/applications/advertising src/appli


From: gnunet
Subject: [GNUnet-SVN] r5900 - in GNUnet: . src/applications/advertising src/applications/bootstrap_http src/applications/chat src/applications/datastore src/applications/dht/module src/applications/dht/tools src/applications/dstore_mysql src/applications/dstore_sqlite src/applications/fragmentation src/applications/fs src/applications/fs/ecrs src/applications/fs/module src/applications/gap src/applications/getoption src/applications/identity src/applications/pingpong src/applications/rpc src/applications/session src/applications/sqstore_mysql src/applications/sqstore_sqlite src/applications/stats src/applications/tbench src/applications/template src/applications/testbed src/applications/topology_default src/applications/tracekit src/applications/traffic src/applications/transport src/applications/vpn src/include src/server src/transports
Date: Fri, 14 Dec 2007 21:41:07 -0700 (MST)

Author: grothoff
Date: 2007-12-14 21:41:05 -0700 (Fri, 14 Dec 2007)
New Revision: 5900

Modified:
   GNUnet/src/applications/advertising/advertising.c
   GNUnet/src/applications/advertising/advertising_test.c
   GNUnet/src/applications/advertising/bootstrap.c
   GNUnet/src/applications/bootstrap_http/http.c
   GNUnet/src/applications/chat/chat.c
   GNUnet/src/applications/datastore/datastore.c
   GNUnet/src/applications/dht/module/cs.c
   GNUnet/src/applications/dht/module/routing.c
   GNUnet/src/applications/dht/module/routing.h
   GNUnet/src/applications/dht/module/service.c
   GNUnet/src/applications/dht/module/table.c
   GNUnet/src/applications/dht/module/table.h
   GNUnet/src/applications/dht/tools/dht-query.c
   GNUnet/src/applications/dht/tools/dht_api.c
   GNUnet/src/applications/dht/tools/dhttest2.c
   GNUnet/src/applications/dstore_mysql/dstore_mysql.c
   GNUnet/src/applications/dstore_sqlite/dstore.c
   GNUnet/src/applications/fragmentation/fragmentation.c
   GNUnet/src/applications/fs/ecrs/search.c
   GNUnet/src/applications/fs/ecrs/unindex.c
   GNUnet/src/applications/fs/ecrs/upload.c
   GNUnet/src/applications/fs/ecrs_core.c
   GNUnet/src/applications/fs/ecrs_core_test.c
   GNUnet/src/applications/fs/module/dht_push.c
   GNUnet/src/applications/fs/module/fs.c
   GNUnet/src/applications/fs/module/migration.c
   GNUnet/src/applications/fs/module/ondemand.c
   GNUnet/src/applications/fs/module/querymanager.c
   GNUnet/src/applications/gap/gap.c
   GNUnet/src/applications/getoption/getoption.c
   GNUnet/src/applications/identity/identity.c
   GNUnet/src/applications/pingpong/pingpong.c
   GNUnet/src/applications/rpc/rpc.c
   GNUnet/src/applications/session/connect.c
   GNUnet/src/applications/sqstore_mysql/mysql.c
   GNUnet/src/applications/sqstore_mysql/mysqltest.c
   GNUnet/src/applications/sqstore_sqlite/sqlite.c
   GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
   GNUnet/src/applications/stats/sqstats.c
   GNUnet/src/applications/stats/statistics.c
   GNUnet/src/applications/tbench/tbench.c
   GNUnet/src/applications/template/template.c
   GNUnet/src/applications/testbed/testbed.c
   GNUnet/src/applications/topology_default/topology.c
   GNUnet/src/applications/tracekit/tracekit.c
   GNUnet/src/applications/tracekit/tracekittest.c
   GNUnet/src/applications/traffic/traffic.c
   GNUnet/src/applications/transport/transport.c
   GNUnet/src/applications/vpn/vpn.c
   GNUnet/src/include/dht.h
   GNUnet/src/include/gnunet_core.h
   GNUnet/src/include/gnunet_dht_lib.h
   GNUnet/src/include/gnunet_dht_service.h
   GNUnet/src/include/gnunet_transport.h
   GNUnet/src/server/core.c
   GNUnet/src/server/gnunet-update.c
   GNUnet/src/transports/http.c
   GNUnet/src/transports/smtp.c
   GNUnet/src/transports/tcp.c
   GNUnet/src/transports/tcp6.c
   GNUnet/src/transports/tcp_helper.c
   GNUnet/src/transports/udp.c
   GNUnet/src/transports/udp6.c
   GNUnet/todo
Log:
cleanup

Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c   2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/advertising/advertising.c   2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -450,8 +450,7 @@
   /* ok, finally we can send! */
   if ((res == GNUNET_OK) &&
       (GNUNET_SYSERR ==
-       coreAPI->GNUNET_CORE_connection_send_plaintext (tsession, buffer,
-                                                       helloEnd)))
+       coreAPI->connection_send_plaintext (tsession, buffer, helloEnd)))
     {
 
       if (stats != NULL)
@@ -563,10 +562,9 @@
     }
   if (stats != NULL)
     stats->change (stat_hello_out, 1);
-  coreAPI->GNUNET_CORE_connection_send_plaintext (tsession,
-                                                  (char *) &sd->m->header,
-                                                  GNUNET_sizeof_hello (sd->
-                                                                       m));
+  coreAPI->connection_send_plaintext (tsession,
+                                      (char *) &sd->m->header,
+                                      GNUNET_sizeof_hello (sd->m));
   transport->disconnect (tsession, __FILE__);
 #if DEBUG_ADVERTISING
   GNUNET_GE_LOG (ectx,
@@ -847,43 +845,43 @@
 {
   coreAPI = capi;
   ectx = capi->ectx;
-  identity = capi->GNUNET_CORE_request_service ("identity");
+  identity = capi->request_service ("identity");
   if (identity == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
       return GNUNET_SYSERR;
     }
-  transport = capi->GNUNET_CORE_request_service ("transport");
+  transport = capi->request_service ("transport");
   if (transport == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
-      capi->GNUNET_CORE_release_service (identity);
+      capi->release_service (identity);
       identity = NULL;
       return GNUNET_SYSERR;
     }
-  pingpong = capi->GNUNET_CORE_request_service ("pingpong");
+  pingpong = capi->request_service ("pingpong");
   if (pingpong == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
-      capi->GNUNET_CORE_release_service (identity);
+      capi->release_service (identity);
       identity = NULL;
-      capi->GNUNET_CORE_release_service (transport);
+      capi->release_service (transport);
       transport = NULL;
       return GNUNET_SYSERR;
     }
-  topology = capi->GNUNET_CORE_request_service ("topology");
+  topology = capi->request_service ("topology");
   if (topology == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
-      capi->GNUNET_CORE_release_service (identity);
+      capi->release_service (identity);
       identity = NULL;
-      capi->GNUNET_CORE_release_service (transport);
+      capi->release_service (transport);
       transport = NULL;
-      capi->GNUNET_CORE_release_service (pingpong);
+      capi->release_service (pingpong);
       pingpong = NULL;
       return GNUNET_SYSERR;
     }
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_hello_in =
@@ -932,8 +930,7 @@
                  "advertising", GNUNET_P2P_PROTO_HELLO);
 
   capi->registerHandler (GNUNET_P2P_PROTO_HELLO, &ehelloHandler);
-  capi->GNUNET_CORE_plaintext_register_handler (GNUNET_P2P_PROTO_HELLO,
-                                                &phelloHandler);
+  capi->plaintext_register_handler (GNUNET_P2P_PROTO_HELLO, &phelloHandler);
   if (0 !=
       GNUNET_GC_attach_change_listener (capi->cfg,
                                         &configurationUpdateCallback, NULL))
@@ -971,19 +968,19 @@
       activeCronJobs -= ACJ_FORWARD;
     }
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_HELLO, &ehelloHandler);
-  coreAPI->GNUNET_CORE_plaintext_unregister_handler (GNUNET_P2P_PROTO_HELLO,
-                                                     &phelloHandler);
-  coreAPI->GNUNET_CORE_release_service (transport);
+  coreAPI->plaintext_unregister_handler (GNUNET_P2P_PROTO_HELLO,
+                                         &phelloHandler);
+  coreAPI->release_service (transport);
   transport = NULL;
-  coreAPI->GNUNET_CORE_release_service (identity);
+  coreAPI->release_service (identity);
   identity = NULL;
-  coreAPI->GNUNET_CORE_release_service (pingpong);
+  coreAPI->release_service (pingpong);
   pingpong = NULL;
-  coreAPI->GNUNET_CORE_release_service (topology);
+  coreAPI->release_service (topology);
   topology = NULL;
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   coreAPI = NULL;

Modified: GNUnet/src/applications/advertising/advertising_test.c
===================================================================
--- GNUnet/src/applications/advertising/advertising_test.c      2007-12-15 
01:09:56 UTC (rev 5899)
+++ GNUnet/src/applications/advertising/advertising_test.c      2007-12-15 
04:41:05 UTC (rev 5900)
@@ -120,20 +120,19 @@
                                                     ectx, "NETWORK", "HOST",
                                                     buf);
           sock = GNUNET_client_connection_create (NULL, cfg);
-         have = -1;
+          have = -1;
           GNUNET_STATS_get_statistics (NULL, sock, &countConnections, &have);
           GNUNET_client_connection_destroy (sock);
-         if (have == -1)
-           {
-             fprintf(stderr,
-                     "Trouble getting statistics!\n");
-           }
-         else 
-           {
-             found += have;
-             if (have < min)
-               min = have;
-           }
+          if (have == -1)
+            {
+              fprintf (stderr, "Trouble getting statistics!\n");
+            }
+          else
+            {
+              found += have;
+              if (have < min)
+                min = have;
+            }
         }
       fprintf (stderr,
                "Have %d connections total in round %d, minimum number was 
%d\n",

Modified: GNUnet/src/applications/advertising/bootstrap.c
===================================================================
--- GNUnet/src/applications/advertising/bootstrap.c     2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/advertising/bootstrap.c     2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -87,10 +87,9 @@
       hcq->hellos[rndidx] = hcq->hellos[hcq->hellosCount - 1];
       GNUNET_array_grow (hcq->hellos, hcq->hellosCount, hcq->hellosCount - 1);
 
-      coreAPI->GNUNET_CORE_p2p_inject_message (NULL,
-                                               (const char *) msg,
-                                               ntohs (msg->header.size),
-                                               GNUNET_NO, NULL);
+      coreAPI->p2p_inject_message (NULL,
+                                   (const char *) msg,
+                                   ntohs (msg->header.size), GNUNET_NO, NULL);
       GNUNET_free (msg);
       if ((hcq->hellosCount > 0) && (!hlc.do_shutdown))
         {
@@ -228,9 +227,9 @@
 startBootstrap (GNUNET_CoreAPIForPlugins * capi)
 {
   coreAPI = capi;
-  state = capi->GNUNET_CORE_request_service ("state");
+  state = capi->request_service ("state");
   GNUNET_GE_ASSERT (capi->ectx, state != NULL);
-  bootstrap = capi->GNUNET_CORE_request_service ("bootstrap");
+  bootstrap = capi->request_service ("bootstrap");
   GNUNET_GE_ASSERT (capi->ectx, bootstrap != NULL);
   hlc.do_shutdown = GNUNET_NO;
   pt = GNUNET_thread_create (&processThread, NULL, 64 * 1024);
@@ -249,9 +248,9 @@
   GNUNET_thread_stop_sleep (pt);
   GNUNET_thread_join (pt, &unused);
   pt = NULL;
-  coreAPI->GNUNET_CORE_release_service (bootstrap);
+  coreAPI->release_service (bootstrap);
   bootstrap = NULL;
-  coreAPI->GNUNET_CORE_release_service (state);
+  coreAPI->release_service (state);
   state = NULL;
   coreAPI = NULL;
 }

Modified: GNUnet/src/applications/bootstrap_http/http.c
===================================================================
--- GNUnet/src/applications/bootstrap_http/http.c       2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/bootstrap_http/http.c       2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -390,7 +390,7 @@
 
   coreAPI = capi;
   ectx = capi->ectx;
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats != NULL)
     {
       stat_hellodownloaded
@@ -404,7 +404,7 @@
 release_module_bootstrap ()
 {
   if (stats != NULL)
-    coreAPI->GNUNET_CORE_release_service (stats);
+    coreAPI->release_service (stats);
   coreAPI = NULL;
 }
 

Modified: GNUnet/src/applications/chat/chat.c
===================================================================
--- GNUnet/src/applications/chat/chat.c 2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/applications/chat/chat.c 2007-12-15 04:41:05 UTC (rev 5900)
@@ -109,7 +109,7 @@
       broadcastToConnected (message, 5, 1);
       cmsg->header.type = htons (GNUNET_CS_PROTO_CHAT_MSG);
       for (j = 0; j < clientCount; j++)
-        coreAPI->GNUNET_CORE_cs_send_to_client (clients[j], &cmsg->header);
+        coreAPI->cs_send_to_client (clients[j], &cmsg->header);
       pmsg->nick[CHAT_NICK_LENGTH - 1] = '\0';
       pmsg->message[CHAT_MSG_LENGTH - 1] = '\0';
       /*
@@ -152,7 +152,7 @@
     if (clients[i] == client)
       j = i;
     else
-      coreAPI->GNUNET_CORE_cs_send_to_client (clients[i], message);
+      coreAPI->cs_send_to_client (clients[i], message);
   if (j == -1)
     {
       if (clientCount == MAX_CLIENTS)
@@ -215,7 +215,7 @@
       capi->registerHandler (GNUNET_P2P_PROTO_CHAT_MSG, &handleChatMSG))
     ok = GNUNET_SYSERR;
   if (GNUNET_SYSERR ==
-      capi->GNUNET_CORE_cs_register_exit_handler (&chatClientExitHandler))
+      capi->cs_register_exit_handler (&chatClientExitHandler))
     ok = GNUNET_SYSERR;
   if (GNUNET_SYSERR == capi->registerClientHandler (GNUNET_CS_PROTO_CHAT_MSG,
                                                     &csHandleChatRequest))
@@ -235,7 +235,7 @@
 done_module_chat ()
 {
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_CHAT_MSG, &handleChatMSG);
-  coreAPI->GNUNET_CORE_cs_exit_handler_unregister (&chatClientExitHandler);
+  coreAPI->cs_exit_handler_unregister (&chatClientExitHandler);
   coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_CHAT_MSG,
                                     &csHandleChatRequest);
   GNUNET_mutex_destroy (&chatMutex);

Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c       2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/datastore/datastore.c       2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -416,7 +416,7 @@
       return NULL;              /* OOPS */
     }
   quota = lquota * 1024 * 1024; /* MB to bytes */
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_filtered =
@@ -428,13 +428,13 @@
                   create (gettext_noop ("# bytes allowed in datastore")),
                   quota);
     }
-  state = capi->GNUNET_CORE_request_service ("state");
+  state = capi->request_service ("state");
   if (state != NULL)
     {
       sqot = GNUNET_htonll (lquota);
       state->write (capi->ectx,
                     "FS-LAST-QUOTA", sizeof (unsigned long long), &sqot);
-      capi->GNUNET_CORE_release_service (state);
+      capi->release_service (state);
     }
   else
     {
@@ -444,12 +444,12 @@
                      _
                      ("Failed to load state service. Trying to do 
without.\n"));
     }
-  sq = capi->GNUNET_CORE_request_service ("sqstore");
+  sq = capi->request_service ("sqstore");
   if (sq == NULL)
     {
       if (stats != NULL)
         {
-          capi->GNUNET_CORE_release_service (stats);
+          capi->release_service (stats);
           stats = NULL;
         }
       GNUNET_GE_BREAK (capi->ectx, 0);
@@ -461,10 +461,10 @@
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
       donePrefetch ();
-      capi->GNUNET_CORE_release_service (sq);
+      capi->release_service (sq);
       if (stats != NULL)
         {
-          capi->GNUNET_CORE_release_service (stats);
+          capi->release_service (stats);
           stats = NULL;
         }
       return NULL;
@@ -511,10 +511,10 @@
   cron = NULL;
   donePrefetch ();
   doneFilters ();
-  coreAPI->GNUNET_CORE_release_service (sq);
+  coreAPI->release_service (sq);
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   sq = NULL;
@@ -555,7 +555,7 @@
                                                        -1) / 1024 / 1024,
                                                       1024, &quota))
     return;                     /* OOPS */
-  state = uapi->GNUNET_CORE_request_service ("state");
+  state = uapi->request_service ("state");
   lq = NULL;
   if ((state != NULL) &&
       (sizeof (unsigned long long) == state->read (uapi->ectx,
@@ -563,7 +563,7 @@
                                                    (void **) &lq)) &&
       (GNUNET_ntohll (*lq) == quota))
     {
-      uapi->GNUNET_CORE_release_service (state);
+      uapi->release_service (state);
       GNUNET_free (lq);
       return;                   /* no change */
     }
@@ -571,11 +571,11 @@
   /* ok, need to convert! */
   deleteFilter (uapi->ectx, uapi->cfg);
   initFilters (uapi->ectx, uapi->cfg);
-  sq = uapi->GNUNET_CORE_request_service ("sqstore");
+  sq = uapi->request_service ("sqstore");
   if (sq != NULL)
     {
       sq->iterateAllNow (&filterAddAll, NULL);
-      uapi->GNUNET_CORE_release_service (sq);
+      uapi->release_service (sq);
     }
   else
     {
@@ -592,7 +592,7 @@
       lastQuota = GNUNET_htonll (quota);
       state->write (uapi->ectx,
                     "FS-LAST-QUOTA", sizeof (unsigned long long), &lastQuota);
-      uapi->GNUNET_CORE_release_service (state);
+      uapi->release_service (state);
     }
 }
 

Modified: GNUnet/src/applications/dht/module/cs.c
===================================================================
--- GNUnet/src/applications/dht/module/cs.c     2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/dht/module/cs.c     2007-12-15 04:41:05 UTC (rev 
5900)
@@ -45,10 +45,15 @@
  */
 static GNUNET_DHT_ServiceAPI *dhtAPI;
 
+/**
+ * Type of the linked list that is used by CS to
+ * keep track of clients and their pending GET 
+ * requests.
+ */
 struct DHT_CLIENT_GET_RECORD
 {
 
-  struct DHT_CLIENT_GET_RECORD * next;
+  struct DHT_CLIENT_GET_RECORD *next;
 
   struct GNUNET_ClientHandle *client;
 
@@ -56,7 +61,10 @@
 
 };
 
-static struct DHT_CLIENT_GET_RECORD * getRecords;
+/**
+ * Linked list of active GET requests.
+ */
+static struct DHT_CLIENT_GET_RECORD *getRecords;
 
 /**
  * Lock.
@@ -87,8 +95,7 @@
                  "`%s' at %s:%d processes put '%.*s'\n",
                  __FUNCTION__, __FILE__, __LINE__, size, &req[1]);
 #endif
-  dhtAPI->put (&req->key, ntohl (req->type), size,
-               (const char *) &req[1]);
+  dhtAPI->put (&req->key, ntohl (req->type), size, (const char *) &req[1]);
   return GNUNET_OK;
 }
 
@@ -127,62 +134,27 @@
                  &value[1]);
 #endif
   if (GNUNET_OK !=
-      coreAPI->GNUNET_CORE_cs_send_to_client (record->client, &msg->header,
-                                              GNUNET_YES))
+      coreAPI->cs_send_to_client (record->client, &msg->header, GNUNET_YES))
     {
       GNUNET_GE_LOG (coreAPI->ectx,
                      GNUNET_GE_ERROR | GNUNET_GE_IMMEDIATE | GNUNET_GE_USER,
                      _("`%s' failed. Terminating connection to client.\n"),
                      "GNUNET_CORE_cs_send_to_client");
-      coreAPI->GNUNET_CORE_cs_terminate_client_connection (record->client);
+      coreAPI->cs_terminate_client_connection (record->client);
     }
   GNUNET_free (msg);
   return GNUNET_OK;
 }
 
 /**
- * Find the record, remove it from the linked list
- * and cancel the operation with the DHT API.
- */
-static void
-get_timeout (void *cls)
-{
-  struct DHT_CLIENT_GET_RECORD *record = cls;
-  struct DHT_CLIENT_GET_RECORD * pos;
-  struct DHT_CLIENT_GET_RECORD * prev;
-
-  GNUNET_mutex_lock (lock);
-  pos = getRecords;
-  prev = NULL;
-  while (pos != NULL)
-    {
-      if (pos == record)
-       break;
-      prev = pos;
-      pos = pos->next;
-    }
-  if (pos == NULL) {
-    GNUNET_mutex_unlock (lock);
-    return;
-  }
-  if (prev == NULL)
-    getRecords = pos->next;
-  else
-    prev->next = pos->next;
-  GNUNET_mutex_unlock (lock);
-  dhtAPI->get_stop (record->get_record);
-  GNUNET_free (record);
-}
-
-/**
  * CS handler for inserting <key,value>-pair into DHT-table.
  */
 static int
 csGet (struct GNUNET_ClientHandle *client,
        const GNUNET_MessageHeader * message)
 {
-  const CS_dht_request_get_MESSAGE * get;
-  struct DHT_CLIENT_GET_RECORD * cpc;
+  const CS_dht_request_get_MESSAGE *get;
+  struct DHT_CLIENT_GET_RECORD *cpc;
 
   if (ntohs (message->size) != sizeof (CS_dht_request_get_MESSAGE))
     {
@@ -199,9 +171,7 @@
   cpc = GNUNET_malloc (sizeof (struct DHT_CLIENT_GET_RECORD));
   cpc->client = client;
   cpc->get_record = dhtAPI->get_start (ntohl (get->type),
-                                       &get->key,
-                                       GNUNET_ntohll (get->timeout),
-                                       &get_result, cpc, &get_timeout, cpc);  
+                                       &get->key, &get_result, cpc);
   GNUNET_mutex_lock (lock);
   cpc->next = getRecords;
   getRecords = cpc;
@@ -216,27 +186,27 @@
 static void
 csClientExit (struct GNUNET_ClientHandle *client)
 {
-  struct GNUNET_DHT_GetHandle * gr;
-  struct DHT_CLIENT_GET_RECORD * pos;
-  struct DHT_CLIENT_GET_RECORD * prev;
+  struct GNUNET_DHT_GetHandle *gr;
+  struct DHT_CLIENT_GET_RECORD *pos;
+  struct DHT_CLIENT_GET_RECORD *prev;
 
   GNUNET_mutex_lock (lock);
   pos = getRecords;
   prev = NULL;
-  while (pos != NULL) 
+  while (pos != NULL)
     {
       if (pos->client == client)
-       {
-         gr = pos->get_record;
-         if (prev == NULL)
-           getRecords = pos->next;
-         else
-           prev->next = pos->next;
+        {
+          gr = pos->get_record;
+          if (prev == NULL)
+            getRecords = pos->next;
+          else
+            prev->next = pos->next;
           GNUNET_mutex_unlock (lock);
           dhtAPI->get_stop (gr);
           GNUNET_free (pos);
           GNUNET_mutex_lock (lock);
-         pos = getRecords;
+          pos = getRecords;
         }
       prev = pos;
       pos = pos->next;
@@ -249,7 +219,7 @@
 {
   int status;
 
-  dhtAPI = capi->GNUNET_CORE_request_service ("dht");
+  dhtAPI = capi->request_service ("dht");
   if (dhtAPI == NULL)
     return GNUNET_SYSERR;
   coreAPI = capi;
@@ -266,8 +236,7 @@
   if (GNUNET_SYSERR ==
       capi->registerClientHandler (GNUNET_CS_PROTO_DHT_REQUEST_GET, &csGet))
     status = GNUNET_SYSERR;
-  if (GNUNET_SYSERR ==
-      capi->GNUNET_CORE_cs_register_exit_handler (&csClientExit))
+  if (GNUNET_SYSERR == capi->cs_exit_handler_register (&csClientExit))
     status = GNUNET_SYSERR;
   GNUNET_GE_ASSERT (capi->ectx,
                     0 == GNUNET_GC_set_configuration_value_string (capi->cfg,
@@ -280,6 +249,41 @@
 }
 
 /**
+ * Find the record, remove it from the linked list
+ * and cancel the operation with the DHT API.
+ */
+static void
+kill_record (void *cls)
+{
+  struct DHT_CLIENT_GET_RECORD *record = cls;
+  struct DHT_CLIENT_GET_RECORD *pos;
+  struct DHT_CLIENT_GET_RECORD *prev;
+
+  GNUNET_mutex_lock (lock);
+  pos = getRecords;
+  prev = NULL;
+  while (pos != NULL)
+    {
+      if (pos == record)
+        break;
+      prev = pos;
+      pos = pos->next;
+    }
+  if (pos == NULL)
+    {
+      GNUNET_mutex_unlock (lock);
+      return;
+    }
+  if (prev == NULL)
+    getRecords = pos->next;
+  else
+    prev->next = pos->next;
+  GNUNET_mutex_unlock (lock);
+  dhtAPI->get_stop (record->get_record);
+  GNUNET_free (record);
+}
+
+/**
  * Unregisters handlers, cleans memory structures etc when node exits.
  */
 int
@@ -299,13 +303,12 @@
       coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_DHT_REQUEST_GET,
                                         &csGet))
     status = GNUNET_SYSERR;
-  if (GNUNET_OK !=
-      coreAPI->GNUNET_CORE_cs_exit_handler_unregister (&csClientExit))
+  if (GNUNET_OK != coreAPI->cs_exit_handler_unregister (&csClientExit))
     status = GNUNET_SYSERR;
 
   while (getRecords != NULL)
-    get_timeout (getRecords);
-  coreAPI->GNUNET_CORE_release_service (dhtAPI);
+    kill_record (getRecords);
+  coreAPI->release_service (dhtAPI);
   dhtAPI = NULL;
   coreAPI = NULL;
   GNUNET_mutex_destroy (lock);

Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c        2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/dht/module/routing.c        2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -134,7 +134,7 @@
    * Reserved (use 0).
    */
   unsigned int reserved;
-  
+
   /**
    * Search key.
    */
@@ -163,13 +163,13 @@
   /**
    * GET message of this record (what we are forwarding).
    */
-  DHT_MESSAGE * get;
+  DHT_MESSAGE *get;
 
   /**
    * Hashcodes of the results that we have send back
    * so far.
    */
-  GNUNET_HashCode * results;
+  GNUNET_HashCode *results;
 
   /**
    * Number of entries in results.
@@ -248,8 +248,8 @@
       result->header.size = htons (sizeof (DHT_MESSAGE) + size);
       result->header.type = htons (GNUNET_P2P_PROTO_DHT_RESULT);
       result->type = htonl (type);
-      result->hop_count = htonl(0);
-      result->reserved = htonl(0);
+      result->hop_count = htonl (0);
+      result->reserved = htonl (0);
       result->key = *key;
       memcpy (&result[1], data, size);
     }
@@ -257,15 +257,15 @@
   routed = 0;
   tracked = 0;
   GNUNET_mutex_lock (lock);
-  now = GNUNET_get_time();
+  now = GNUNET_get_time ();
   for (i = 0; i < rt_size; i++)
     {
       q = records[i];
       if (q == NULL)
         continue;
       tracked++;
-      if ( (ntohl (q->get->type) != type) ||
-          (0 != memcmp (key, &q->get->key, sizeof (GNUNET_HashCode))) )
+      if ((ntohl (q->get->type) != type) ||
+          (0 != memcmp (key, &q->get->key, sizeof (GNUNET_HashCode))))
         continue;
       found = GNUNET_NO;
       for (j = 0; j < q->result_count; j++)
@@ -275,51 +275,50 @@
             break;
           }
       if (found == GNUNET_YES)
-       {
+        {
 #if DEBUG_ROUTING
-         GNUNET_GE_LOG (coreAPI->ectx,
-                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
-                        GNUNET_GE_DEVELOPER,
-                        "Seen the same result earlier, not routing it 
again.\n");
+          GNUNET_GE_LOG (coreAPI->ectx,
+                         GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                         GNUNET_GE_DEVELOPER,
+                         "Seen the same result earlier, not routing it 
again.\n");
 #endif
-         continue;
-       }
+          continue;
+        }
       routed++;
       GNUNET_array_grow (q->results, q->result_count, q->result_count + 1);
       q->results[q->result_count - 1] = hc;
       pos = q->sources;
       while (pos != NULL)
         {
-          if (pos->expires < now) {
+          if (pos->expires < now)
+            {
 #if DEBUG_ROUTING
-             GNUNET_hash_to_enc (&pos->source.hashPubKey, &enc);
-             GNUNET_GE_LOG (coreAPI->ectx,
+              GNUNET_hash_to_enc (&pos->source.hashPubKey, &enc);
+              GNUNET_GE_LOG (coreAPI->ectx,
                              GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
                              GNUNET_GE_DEVELOPER,
                              "Route to peer `%s' has expired (%llu < %llu)\n",
-                            &enc,
-                            pos->expires, now);
+                             &enc, pos->expires, now);
 #endif
-             continue;
-         }       
-         if (0 != memcmp (&pos->source,
-                          coreAPI->myIdentity, sizeof (GNUNET_PeerIdentity)))
-           {
+              continue;
+            }
+          if (0 != memcmp (&pos->source,
+                           coreAPI->myIdentity, sizeof (GNUNET_PeerIdentity)))
+            {
 #if DEBUG_ROUTING
-             GNUNET_hash_to_enc (&pos->source.hashPubKey, &enc);
-             GNUNET_GE_LOG (coreAPI->ectx,
+              GNUNET_hash_to_enc (&pos->source.hashPubKey, &enc);
+              GNUNET_GE_LOG (coreAPI->ectx,
                              GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
                              GNUNET_GE_DEVELOPER,
-                             "Routing result to `%s'\n",
-                            &enc);
+                             "Routing result to `%s'\n", &enc);
 #endif
               coreAPI->unicast (&pos->source,
-                               &result->header, DHT_PRIORITY,  
+                                &result->header, DHT_PRIORITY,
                                 pos->expires - now);
               if (stats != NULL)
                 stats->change (stat_replies_routed, 1);
-            } 
-         if (pos->receiver != NULL)
+            }
+          if (pos->receiver != NULL)
             {
 #if DEBUG_ROUTING
               GNUNET_GE_LOG (coreAPI->ectx,
@@ -350,8 +349,7 @@
  */
 static int
 addRoute (const GNUNET_PeerIdentity * sender,
-          GNUNET_ResultProcessor handler, void *cls,
-          const DHT_MESSAGE * get)
+          GNUNET_ResultProcessor handler, void *cls, const DHT_MESSAGE * get)
 {
   DHTQueryRecord *q;
   unsigned int i;
@@ -370,33 +368,33 @@
   rt_pos = rt_size;
   for (i = 0; i < rt_size; i++)
     {
-      if ( (records[i] != NULL) &&
-          (0 == memcmp (&records[i]->get->key,
-                        &get->key,
-                        sizeof (GNUNET_HashCode))) &&
-          (records[i]->get->type == get->type) )
+      if ((records[i] != NULL) &&
+          (0 == memcmp (&records[i]->get->key,
+                        &get->key,
+                        sizeof (GNUNET_HashCode))) &&
+          (records[i]->get->type == get->type))
         {
-         rt_pos = i;
-         break;
+          rt_pos = i;
+          break;
         }
-      if (records[i] == NULL) 
-       {
-         rt_pos = i;
-         break;
-       }
-      if (records[i]->expires < now) 
-       {
-         rt_pos = i;
-         GNUNET_free(records[rt_pos]->get);
-         records[rt_pos]->get = NULL;
-         while (records[rt_pos]->sources != NULL)
-           {
-             pos = records[rt_pos]->sources;
-             records[rt_pos]->sources = pos->next;
-             GNUNET_free (pos);
-           }    
-         break;
-       }
+      if (records[i] == NULL)
+        {
+          rt_pos = i;
+          break;
+        }
+      if (records[i]->expires < now)
+        {
+          rt_pos = i;
+          GNUNET_free (records[rt_pos]->get);
+          records[rt_pos]->get = NULL;
+          while (records[rt_pos]->sources != NULL)
+            {
+              pos = records[rt_pos]->sources;
+              records[rt_pos]->sources = pos->next;
+              GNUNET_free (pos);
+            }
+          break;
+        }
     }
   if (rt_pos == rt_size)
     {
@@ -463,19 +461,20 @@
     GNUNET_hash_to_enc (&sender->hashPubKey, &henc);
   GNUNET_GE_LOG (coreAPI->ectx,
                  GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
-                 "Received DHT GET for key `%s' from `%s'.\n", &enc, sender == 
NULL ? "me" : (char*) &henc);
+                 "Received DHT GET for key `%s' from `%s'.\n", &enc,
+                 sender == NULL ? "me" : (char *) &henc);
 #endif
   if (stats != NULL)
     stats->change (stat_get_requests_received, 1);
-  if ( (sender != NULL) &&
-       (GNUNET_OK != addRoute (sender, NULL, NULL, get)) )
+  if ((sender != NULL) && (GNUNET_OK != addRoute (sender, NULL, NULL, get)))
     {
 #if DEBUG_ROUTING
       GNUNET_GE_LOG (coreAPI->ectx,
-                    GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
-                    "Failed to add entry in routing table for request.\n");
+                     GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                     GNUNET_GE_DEVELOPER,
+                     "Failed to add entry in routing table for request.\n");
 #endif
-      return GNUNET_OK;           /* could not route */
+      return GNUNET_OK;         /* could not route */
     }
   total = dstore->get (&get->key, ntohl (get->type), &routeResult, NULL);
   if ((total > GET_TRIES) && (sender != NULL))
@@ -490,42 +489,43 @@
       return GNUNET_OK;
     }
   aget = *get;
-  aget.hop_count = htonl(1 + ntohl(get->hop_count));
+  aget.hop_count = htonl (1 + ntohl (get->hop_count));
   for (i = 0; i < GET_TRIES; i++)
     {
-      if (GNUNET_OK != select_dht_peer (&next[i], &get->key, &next[0], i))
-       {
+      if (GNUNET_OK !=
+          GNUNET_DHT_select_peer (&next[i], &get->key, &next[0], i))
+        {
 #if DEBUG_ROUTING
-         GNUNET_GE_LOG (coreAPI->ectx,
-                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
-                        GNUNET_GE_DEVELOPER,
-                        "Failed to select peer for fowarding in round %d/%d\n",
-                        i,
-                        GET_TRIES);
+          GNUNET_GE_LOG (coreAPI->ectx,
+                         GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                         GNUNET_GE_DEVELOPER,
+                         "Failed to select peer for fowarding in round 
%d/%d\n",
+                         i, GET_TRIES);
 #endif
-         break;
-       }
+          break;
+        }
       if (-1 == GNUNET_hash_xorcmp (&next[i].hashPubKey,
                                     &coreAPI->myIdentity->hashPubKey,
-                                    &get->key)) 
-       {
+                                    &get->key))
+        {
 #if DEBUG_ROUTING
-         GNUNET_hash_to_enc (&next[i].hashPubKey, &enc);
-         GNUNET_GE_LOG (coreAPI->ectx,
-                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | 
GNUNET_GE_DEVELOPER,
-                        "Forwarding DHT GET request to peer `%s'.\n", &enc);
+          GNUNET_hash_to_enc (&next[i].hashPubKey, &enc);
+          GNUNET_GE_LOG (coreAPI->ectx,
+                         GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                         GNUNET_GE_DEVELOPER,
+                         "Forwarding DHT GET request to peer `%s'.\n", &enc);
 #endif
-         coreAPI->unicast (&next[i], &aget.header, DHT_PRIORITY, DHT_DELAY);   
     
-       }
+          coreAPI->unicast (&next[i], &aget.header, DHT_PRIORITY, DHT_DELAY);
+        }
       else
-       {
+        {
 #if DEBUG_ROUTING
-         GNUNET_GE_LOG (coreAPI->ectx,
-                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
-                        GNUNET_GE_DEVELOPER,
-                        "Will not foward message to peer, we are closer!\n");
+          GNUNET_GE_LOG (coreAPI->ectx,
+                         GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                         GNUNET_GE_DEVELOPER,
+                         "Will not foward message to peer, we are closer!\n");
 #endif
-       }
+        }
     }
   return GNUNET_OK;
 }
@@ -538,7 +538,7 @@
            const GNUNET_MessageHeader * msg)
 {
   GNUNET_PeerIdentity next[PUT_TRIES];
-  const DHT_MESSAGE * put;
+  const DHT_MESSAGE *put;
   GNUNET_CronTime now;
   int store;
   int i;
@@ -564,43 +564,43 @@
   /* FIXME: increase hop counter! */
   for (i = 0; i < PUT_TRIES; i++)
     {
-      if (GNUNET_OK != select_dht_peer (&next[i], &put->key, &next[0], i))
+      if (GNUNET_OK !=
+          GNUNET_DHT_select_peer (&next[i], &put->key, &next[0], i))
         {
 #if DEBUG_ROUTING
-         GNUNET_GE_LOG (coreAPI->ectx,
-                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
-                        GNUNET_GE_DEVELOPER,
-                        "Failed to select peer for PUT fowarding in round 
%d/%d\n",
-                        i,
-                        PUT_TRIES);
+          GNUNET_GE_LOG (coreAPI->ectx,
+                         GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                         GNUNET_GE_DEVELOPER,
+                         "Failed to select peer for PUT fowarding in round 
%d/%d\n",
+                         i, PUT_TRIES);
 #endif
-         store = 1;
+          store = 1;
           break;
         }
       if (1 == GNUNET_hash_xorcmp (&next[i].hashPubKey,
                                    &coreAPI->myIdentity->hashPubKey,
                                    &put->key))
-       {
+        {
 #if DEBUG_ROUTING
-         GNUNET_GE_LOG (coreAPI->ectx,
-                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
-                        GNUNET_GE_DEVELOPER,
-                        "We are closer than selected peer for PUT in round 
%d/%d\n",
-                        i,
-                        PUT_TRIES);
+          GNUNET_GE_LOG (coreAPI->ectx,
+                         GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                         GNUNET_GE_DEVELOPER,
+                         "We are closer than selected peer for PUT in round 
%d/%d\n",
+                         i, PUT_TRIES);
 #endif
-         store = 1;              /* we're closer than the selected target */
-       }
+          store = 1;            /* we're closer than the selected target */
+        }
       else
-       {
+        {
 #if DEBUG_ROUTING
-         GNUNET_hash_to_enc (&next[i].hashPubKey, &enc);
-         GNUNET_GE_LOG (coreAPI->ectx,
-                        GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | 
GNUNET_GE_DEVELOPER,
-                        "Forwarding DHT PUT request to peer `%s'.\n", &enc);
+          GNUNET_hash_to_enc (&next[i].hashPubKey, &enc);
+          GNUNET_GE_LOG (coreAPI->ectx,
+                         GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+                         GNUNET_GE_DEVELOPER,
+                         "Forwarding DHT PUT request to peer `%s'.\n", &enc);
 #endif
-         coreAPI->unicast (&next[i], msg, DHT_PRIORITY, DHT_DELAY); 
-       }
+          coreAPI->unicast (&next[i], msg, DHT_PRIORITY, DHT_DELAY);
+        }
     }
   if (store != 0)
     {
@@ -611,14 +611,13 @@
                      GNUNET_GE_DEVELOPER,
                      "Decided to cache data `%.*s' locally until %llu (for 
%llu ms)\n",
                      ntohs (put->header.size) - sizeof (DHT_MESSAGE),
-                     &put[1], CONTENT_LIFETIME + now,
-                     CONTENT_LIFETIME);
+                     &put[1], CONTENT_LIFETIME + now, CONTENT_LIFETIME);
 #endif
       dstore->put (&put->key,
-                  ntohl (put->type),
-                  CONTENT_LIFETIME + now,
-                  ntohs (put->header.size) - sizeof (DHT_MESSAGE),
-                  (const char *) &put[1]);
+                   ntohl (put->type),
+                   CONTENT_LIFETIME + now,
+                   ntohs (put->header.size) - sizeof (DHT_MESSAGE),
+                   (const char *) &put[1]);
     }
   else
     {
@@ -672,7 +671,8 @@
  */
 int
 GNUNET_DHT_get_start (const GNUNET_HashCode * key,
-               unsigned int type, GNUNET_ResultProcessor handler, void *cls)
+                      unsigned int type, GNUNET_ResultProcessor handler,
+                      void *cls)
 {
   DHT_MESSAGE get;
 #if DEBUG_ROUTING
@@ -682,18 +682,19 @@
   get.header.size = htons (sizeof (DHT_MESSAGE));
   get.header.type = htons (GNUNET_P2P_PROTO_DHT_GET);
   get.type = htonl (type);
-  get.hop_count = htonl(0);
-  get.reserved = htonl(0);
+  get.hop_count = htonl (0);
+  get.reserved = htonl (0);
   get.key = *key;
 #if DEBUG_ROUTING
   GNUNET_hash_to_enc (&get.key, &enc);
   GNUNET_GE_LOG (coreAPI->ectx,
                  GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
-                 "Initiating DHT GET (based on local request) for key 
`%s'.\n", &enc);
+                 "Initiating DHT GET (based on local request) for key `%s'.\n",
+                 &enc);
 #endif
   if (GNUNET_OK != addRoute (NULL, handler, cls, &get))
     return GNUNET_SYSERR;
-  handleGet (NULL, &get.header);  
+  handleGet (NULL, &get.header);
   return GNUNET_OK;
 }
 
@@ -703,7 +704,8 @@
  */
 int
 GNUNET_DHT_get_stop (const GNUNET_HashCode * key,
-                    unsigned int type, GNUNET_ResultProcessor handler, void 
*cls)
+                     unsigned int type, GNUNET_ResultProcessor handler,
+                     void *cls)
 {
   int i;
   struct DHT_Source_Route *pos;
@@ -762,8 +764,7 @@
  */
 int
 GNUNET_DHT_put (const GNUNET_HashCode * key,
-               unsigned int type,
-               unsigned int size, const char *data)
+                unsigned int type, unsigned int size, const char *data)
 {
   DHT_MESSAGE *put;
 
@@ -772,8 +773,8 @@
   put->header.type = htons (GNUNET_P2P_PROTO_DHT_PUT);
   put->key = *key;
   put->type = htonl (type);
-  put->hop_count = htonl(0);
-  put->reserved = htonl(0);
+  put->hop_count = htonl (0);
+  put->reserved = htonl (0);
   memcpy (&put[1], data, size);
   handlePut (NULL, &put->header);
   GNUNET_free (put);
@@ -813,13 +814,13 @@
                                             "DHT",
                                             "TABLESIZE",
                                             128, 1024 * 1024, 1024, &rts);
-  dstore = coreAPI->GNUNET_CORE_request_service ("dstore");
-  if (dstore == NULL) 
-    return GNUNET_SYSERR;    
+  dstore = coreAPI->request_service ("dstore");
+  if (dstore == NULL)
+    return GNUNET_SYSERR;
   GNUNET_array_grow (records, rt_size, rts);
 
   lock = GNUNET_mutex_create (GNUNET_NO);
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_replies_routed =
@@ -843,8 +844,8 @@
   coreAPI->registerHandler (GNUNET_P2P_PROTO_DHT_PUT, &handlePut);
   coreAPI->registerHandler (GNUNET_P2P_PROTO_DHT_RESULT, &handleResult);
   coreAPI->
-    GNUNET_CORE_connection_register_send_callback (sizeof (DHT_MESSAGE),
-                                                   &extra_get_callback);
+    connection_register_send_callback (sizeof (DHT_MESSAGE),
+                                       &extra_get_callback);
   return GNUNET_OK;
 }
 
@@ -859,14 +860,14 @@
   unsigned int i;
 
   coreAPI->
-    GNUNET_CORE_connection_unregister_send_callback (sizeof (DHT_MESSAGE),
-                                                     &extra_get_callback);
+    connection_unregister_send_callback (sizeof (DHT_MESSAGE),
+                                         &extra_get_callback);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_DHT_GET, &handleGet);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_DHT_PUT, &handlePut);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_DHT_RESULT, &handleResult);
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   GNUNET_mutex_destroy (lock);
@@ -879,7 +880,7 @@
         }
     }
   GNUNET_array_grow (records, rt_size, 0);
-  coreAPI->GNUNET_CORE_release_service (dstore);
+  coreAPI->release_service (dstore);
   return GNUNET_OK;
 }
 

Modified: GNUnet/src/applications/dht/module/routing.h
===================================================================
--- GNUnet/src/applications/dht/module/routing.h        2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/dht/module/routing.h        2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -35,16 +35,16 @@
  * Start a DHT get operation.
  */
 int GNUNET_DHT_get_start (const GNUNET_HashCode * key,
-                         unsigned int type, GNUNET_ResultProcessor handler,
-                         void *cls);
+                          unsigned int type, GNUNET_ResultProcessor handler,
+                          void *cls);
 
 /**
  * Stop a DHT get operation (prevents calls to
  * the given iterator).
  */
 int GNUNET_DHT_get_stop (const GNUNET_HashCode * key,
-                        unsigned int type, GNUNET_ResultProcessor handler,
-                        void *cls);
+                         unsigned int type, GNUNET_ResultProcessor handler,
+                         void *cls);
 
 /**
  * Perform a DHT put operation.  Note that PUT operations always
@@ -54,9 +54,7 @@
  * @param expirationTime absolute expiration time
  */
 int GNUNET_DHT_put (const GNUNET_HashCode * key,
-                   unsigned int type,
-                   unsigned int size,
-                   const char *data);
+                    unsigned int type, unsigned int size, const char *data);
 
 /**
  * Initialize routing DHT component.

Modified: GNUnet/src/applications/dht/module/service.c
===================================================================
--- GNUnet/src/applications/dht/module/service.c        2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/dht/module/service.c        2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -1,6 +1,6 @@
 /*
       This file is part of GNUnet
-      (C) 2006 Christian Grothoff (and other contributing authors)
+      (C) 2006, 2007 Christian Grothoff (and other contributing authors)
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
@@ -35,9 +35,10 @@
  */
 static GNUNET_CoreAPIForPlugins *coreAPI;
 
-static struct GNUNET_CronManager *cron;
-
-typedef struct GNUNET_DHT_GetHandle
+/**
+ * Handle used to track GET activity.
+ */
+struct GNUNET_DHT_GetHandle
 {
   /**
    * Key that we are looking for.
@@ -55,21 +56,11 @@
   void *cls;
 
   /**
-   * Function to call once we are done
-   */
-  GNUNET_DHT_OperationCompleteCallback callbackComplete;
-
-  /**
-   * Extra argument to callbackComplete
-   */
-  void *closure;
-
-  /**
    * Type of the content that we are looking for.
    */
   unsigned int type;
 
-} DHT_GET_RECORD;
+};
 
 static void
 client_result_converter (const GNUNET_HashCode * key,
@@ -87,17 +78,6 @@
 }
 
 /**
- * Cron job that notifies the client.
- */
-static void
-timeout_callback (void *cls)
-{
-  struct GNUNET_DHT_GetHandle *rec = cls;
-
-  rec->callbackComplete (rec->closure);
-}
-
-/**
  * Perform an asynchronous GET operation on the DHT identified by
  * 'table' using 'key' as the key.  The peer does not have to be part
  * of the table (if so, we will attempt to locate a peer that is!).
@@ -110,35 +90,27 @@
  * @param timeout how long to wait until this operation should
  *        automatically time-out
  * @param callback function to call on each result
- * @param closure extra argument to callback
- * @param callbackComplete function called on time-out
- *        (but not on explicit async_stop).
+ * @param cls extra argument to callback
  * @return handle to stop the async get
  */
 static struct GNUNET_DHT_GetHandle *
 dht_get_async_start (unsigned int type,
                      const GNUNET_HashCode * key,
-                     GNUNET_CronTime timeout,
-                     GNUNET_DataProcessor callback,
-                     void *cls,
-                     GNUNET_DHT_OperationCompleteCallback callbackComplete,
-                     void *closure)
+                     GNUNET_DataProcessor callback, void *cls)
 {
   struct GNUNET_DHT_GetHandle *ret;
 
-  ret = GNUNET_malloc (sizeof (DHT_GET_RECORD));
+  ret = GNUNET_malloc (sizeof (struct GNUNET_DHT_GetHandle));
   ret->key = *key;
   ret->callback = callback;
   ret->cls = cls;
-  ret->callbackComplete = callbackComplete;
-  ret->closure = closure;
   ret->type = type;
-  if (GNUNET_OK != GNUNET_DHT_get_start (key, type, &client_result_converter, 
ret))
+  if (GNUNET_OK !=
+      GNUNET_DHT_get_start (key, type, &client_result_converter, ret))
     {
-      GNUNET_free(ret);
+      GNUNET_free (ret);
       return NULL;
     }
-  GNUNET_cron_add_job (cron, &timeout_callback, timeout, 0, ret);
   return ret;
 }
 
@@ -148,10 +120,8 @@
 static int
 dht_get_async_stop (struct GNUNET_DHT_GetHandle *record)
 {
-  GNUNET_cron_suspend_jobs (cron, GNUNET_YES);
-  GNUNET_cron_del_job (cron, &timeout_callback, 0, record);
-  GNUNET_cron_resume_jobs (cron, GNUNET_YES);
-  GNUNET_DHT_get_stop (&record->key, record->type, &client_result_converter, 
record);
+  GNUNET_DHT_get_stop (&record->key, record->type, &client_result_converter,
+                       record);
   GNUNET_free (record);
   return GNUNET_OK;
 }
@@ -168,9 +138,7 @@
 {
   static GNUNET_DHT_ServiceAPI api;
 
-  cron = GNUNET_cron_create (capi->ectx);
-  GNUNET_cron_start (cron);
-  if (GNUNET_OK != init_dht_table (capi))
+  if (GNUNET_OK != GNUNET_DHT_table_init (capi))
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
       return NULL;
@@ -178,7 +146,7 @@
   if (GNUNET_OK != GNUNET_DHT_init_routing (capi))
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
-      done_dht_table ();
+      GNUNET_DHT_table_done ();
       return NULL;
     }
   coreAPI = capi;
@@ -194,10 +162,8 @@
 int
 release_module_dht ()
 {
-  GNUNET_cron_stop (cron);
   GNUNET_DHT_done_routing ();
-  done_dht_table ();
-  GNUNET_cron_destroy (cron);
+  GNUNET_DHT_table_done ();
   return GNUNET_OK;
 }
 

Modified: GNUnet/src/applications/dht/module/table.c
===================================================================
--- GNUnet/src/applications/dht/module/table.c  2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/dht/module/table.c  2007-12-15 04:41:05 UTC (rev 
5900)
@@ -717,9 +717,7 @@
   coreAPI = capi;
   /* use less than 50% of peer's ideal number of
      connections for DHT table size */
-  i =
-    coreAPI->GNUNET_CORE_connection_get_slot_count () / MAINTAIN_BUCKET_SIZE /
-    2;
+  i = coreAPI->connection_get_slot_count () / MAINTAIN_BUCKET_SIZE / 2;
   if (i < 4)
     i = 4;
   GNUNET_array_grow (buckets, bucketCount, i);
@@ -728,8 +726,8 @@
       buckets[i].bstart = 512 * i / bucketCount;
       buckets[i].bend = 512 * (i + 1) / bucketCount;
     }
-  lock = capi->GNUNET_CORE_connection_get_lock ();
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  lock = capi->connection_get_lock ();
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_dht_total_peers =
@@ -741,9 +739,9 @@
       stat_dht_advertisements =
         stats->create (gettext_noop ("# dht discovery messages sent"));
     }
-  identity = coreAPI->GNUNET_CORE_request_service ("identity");
+  identity = coreAPI->request_service ("identity");
   GNUNET_GE_ASSERT (coreAPI->ectx, identity != NULL);
-  pingpong = coreAPI->GNUNET_CORE_request_service ("pingpong");
+  pingpong = coreAPI->request_service ("pingpong");
   GNUNET_GE_ASSERT (coreAPI->ectx, pingpong != NULL);
   capi->registerHandler (GNUNET_P2P_PROTO_DHT_DISCOVERY, &handleDiscovery);
   capi->registerHandler (GNUNET_P2P_PROTO_DHT_ASK_HELLO, &handleAskHello);
@@ -772,12 +770,12 @@
                        NULL);
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
-  coreAPI->GNUNET_CORE_release_service (identity);
+  coreAPI->release_service (identity);
   identity = NULL;
-  coreAPI->GNUNET_CORE_release_service (pingpong);
+  coreAPI->release_service (pingpong);
   pingpong = NULL;
   for (i = 0; i < bucketCount; i++)
     {

Modified: GNUnet/src/applications/dht/module/table.h
===================================================================
--- GNUnet/src/applications/dht/module/table.h  2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/dht/module/table.h  2007-12-15 04:41:05 UTC (rev 
5900)
@@ -42,10 +42,10 @@
  *
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int select_dht_peer (GNUNET_PeerIdentity * set,
-                     const GNUNET_HashCode * target,
-                     const GNUNET_PeerIdentity * blocked,
-                     unsigned int blocked_size);
+int GNUNET_DHT_select_peer (GNUNET_PeerIdentity * set,
+                            const GNUNET_HashCode * target,
+                            const GNUNET_PeerIdentity * blocked,
+                            unsigned int blocked_size);
 
 /**
  * Initialize table DHT component.
@@ -53,13 +53,13 @@
  * @param capi the core API
  * @return GNUNET_OK on success
  */
-int init_dht_table (GNUNET_CoreAPIForPlugins * capi);
+int GNUNET_DHT_table_init (GNUNET_CoreAPIForPlugins * capi);
 
 /**
  * Shutdown table DHT component.
  *
  * @return GNUNET_OK on success
  */
-int done_dht_table (void);
+int GNUNET_DHT_table_done (void);
 
 #endif

Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c       2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/dht/tools/dht-query.c       2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -53,8 +53,7 @@
   GNUNET_COMMAND_LINE_OPTION_HOSTNAME,  /* -H */
   GNUNET_COMMAND_LINE_OPTION_LOGGING,   /* -L */
   {'T', "timeout", "TIME",
-   gettext_noop
-   ("allow TIME ms to process a GET command"),
+   gettext_noop ("allow TIME ms to process a GET command"),
    1, &GNUNET_getopt_configure_set_ulong, &timeout},
   GNUNET_COMMAND_LINE_OPTION_VERSION (PACKAGE_VERSION), /* -v */
   GNUNET_COMMAND_LINE_OPTION_VERBOSE,
@@ -114,8 +113,9 @@
 #endif
   if (timeout == 0)
     timeout = 30 * GNUNET_CRON_MINUTES;
-  if (GNUNET_OK == GNUNET_DHT_put (cfg, ectx, &hc, 
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                                   dc))
+  if (GNUNET_OK ==
+      GNUNET_DHT_put (cfg, ectx, &hc, GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                      dc))
     {
       printf (_("'%s(%s,%s)' succeeded\n"), "put", key, value);
     }

Modified: GNUnet/src/applications/dht/tools/dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_api.c 2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/dht/tools/dht_api.c 2007-12-15 04:41:05 UTC (rev 
5900)
@@ -1,6 +1,6 @@
 /*
       This file is part of GNUnet
-      (C) 2004, 2005, 2006 Christian Grothoff (and other contributing authors)
+      (C) 2004, 2005, 2006, 2007 Christian Grothoff (and other contributing 
authors)
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
@@ -68,9 +68,10 @@
   int aborted;
 
   /**
-   * Total number of results obtained, or -1 on error.
+   * Total number of results obtained
    */
-  int total;
+  unsigned int total;
+
 } GetInfo;
 
 
@@ -81,7 +82,7 @@
   GNUNET_MessageHeader *reply;
   CS_dht_request_put_MESSAGE *put;
   GNUNET_DataContainer *cont;
-  unsigned short size;
+  unsigned int size;
 
   while (info->aborted == GNUNET_NO)
     {
@@ -94,22 +95,20 @@
           (GNUNET_CS_PROTO_DHT_REQUEST_PUT != ntohs (reply->type)))
         {
           GNUNET_GE_BREAK (NULL, 0);
-          info->total = GNUNET_SYSERR;
+          GNUNET_free (reply);
           break;                /*  invalid reply */
         }
-
-      put = (CS_dht_request_put_MESSAGE *) reply;
-      /* re-use "expire" field of the reply (which is 0 anyway)
-         for the header of GNUNET_DataContainer (which fits) to avoid
-         copying -- go C pointer arithmetic! */
-      cont =
-        (GNUNET_DataContainer *) & ((char *)
-                                    &put[1])[-sizeof (GNUNET_DataContainer)];
       size = ntohs (reply->size) - sizeof (CS_dht_request_put_MESSAGE);
-      cont->size = htonl (size + sizeof (GNUNET_DataContainer));
-      if ((info->processor != NULL) &&
-          (GNUNET_OK != info->processor (&put->key, cont, info->closure)))
-        info->aborted = GNUNET_YES;
+      put = (CS_dht_request_put_MESSAGE *) reply;
+      if (info->processor != NULL)
+        {
+          cont = GNUNET_malloc (sizeof (GNUNET_DataContainer) + size);
+          cont->size = htonl (sizeof (GNUNET_DataContainer) + size);
+          memcpy (&cont[1], &put[1], size);
+          if (GNUNET_OK != info->processor (&put->key, cont, info->closure))
+            info->aborted = GNUNET_YES;
+          GNUNET_free (cont);
+        }
       info->total++;
       GNUNET_free (reply);
     }
@@ -161,7 +160,6 @@
   req.header.size = htons (sizeof (CS_dht_request_get_MESSAGE));
   req.header.type = htons (GNUNET_CS_PROTO_DHT_REQUEST_GET);
   req.type = htonl (type);
-  req.timeout = GNUNET_htonll (timeout);
   req.key = *key;
   if (GNUNET_OK != GNUNET_client_connection_write (sock, &req.header))
     {
@@ -208,15 +206,12 @@
 GNUNET_DHT_put (struct GNUNET_GC_Configuration *cfg,
                 struct GNUNET_GE_Context *ectx,
                 const GNUNET_HashCode * key,
-                unsigned int type,
-                const GNUNET_DataContainer * value)
+                unsigned int type, const GNUNET_DataContainer * value)
 {
   struct GNUNET_ClientServerConnection *sock;
   CS_dht_request_put_MESSAGE *req;
   int ret;
-  GNUNET_CronTime now;
 
-  now = GNUNET_get_time ();
 #if DEBUG_DHT_API
   GNUNET_GE_LOG (ectx,
                  GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,

Modified: GNUnet/src/applications/dht/tools/dhttest2.c
===================================================================
--- GNUnet/src/applications/dht/tools/dhttest2.c        2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/dht/tools/dhttest2.c        2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -190,14 +190,16 @@
   GNUNET_hash ("key2", 4, &key);
   printf ("Peer2 gets key2.\n");
   left = 10;
-  do {
-    if (1 == GNUNET_DHT_get (cfg,
-                            ectx,
-                            GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                            &key, 30 * GNUNET_CRON_SECONDS, NULL, NULL))
-      break;
-    left--;
-  } while (left > 0);
+  do
+    {
+      if (1 == GNUNET_DHT_get (cfg,
+                               ectx,
+                               GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                               &key, 30 * GNUNET_CRON_SECONDS, NULL, NULL))
+        break;
+      left--;
+    }
+  while (left > 0);
   CHECK (left > 0);
   /* switch to peer1 */
   GNUNET_GC_set_configuration_value_string (cfg,
@@ -206,15 +208,17 @@
                                             "localhost:2087");
   printf ("Peer1 gets key\n");
   left = 10;
-  do {
-    if (1 == GNUNET_DHT_get (cfg,
-                            ectx,
-                            GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
-                            &key, 300 * GNUNET_CRON_SECONDS, NULL, NULL))
-      break;
-    left--;
-  } while (left > 0);
-  CHECK(left > 0);
+  do
+    {
+      if (1 == GNUNET_DHT_get (cfg,
+                               ectx,
+                               GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+                               &key, 300 * GNUNET_CRON_SECONDS, NULL, NULL))
+        break;
+      left--;
+    }
+  while (left > 0);
+  CHECK (left > 0);
   /* end of actual test code */
 
 FAILURE:

Modified: GNUnet/src/applications/dstore_mysql/dstore_mysql.c
===================================================================
--- GNUnet/src/applications/dstore_mysql/dstore_mysql.c 2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/dstore_mysql/dstore_mysql.c 2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -656,7 +656,7 @@
                                        5);
       CLOSE (fd);
     }
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     stat_dstore_size = stats->create (gettext_noop ("# bytes in dstore"));
   return &api;
@@ -678,7 +678,7 @@
   bloom_name = NULL;
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
 #if DEBUG_SQLITE

Modified: GNUnet/src/applications/dstore_sqlite/dstore.c
===================================================================
--- GNUnet/src/applications/dstore_sqlite/dstore.c      2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/dstore_sqlite/dstore.c      2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -530,7 +530,7 @@
                                        5);
       CLOSE (fd);
     }
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     stat_dstore_size = stats->create (gettext_noop ("# bytes in dstore"));
   return &api;
@@ -555,7 +555,7 @@
   bloom_name = NULL;
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
 #if DEBUG_SQLITE

Modified: GNUnet/src/applications/fragmentation/fragmentation.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentation.c       2007-12-15 
01:09:56 UTC (rev 5899)
+++ GNUnet/src/applications/fragmentation/fragmentation.c       2007-12-15 
04:41:05 UTC (rev 5900)
@@ -229,8 +229,7 @@
   printf ("Finished defragmentation!\n");
 #endif
   /* handle message! */
-  coreAPI->GNUNET_CORE_p2p_inject_message (&pep->sender, msg, len, GNUNET_YES,
-                                           NULL);
+  coreAPI->p2p_inject_message (&pep->sender, msg, len, GNUNET_YES, NULL);
   GNUNET_free (msg);
 CLEANUP:
   /* free fragment buffers */
@@ -558,8 +557,8 @@
         }
     }
   xlen = mtu - sizeof (P2P_fragmentation_MESSAGE);
-  coreAPI->GNUNET_CORE_connection_send_using_callback (peer, &fragmentBMC, 
fbmc, mtu, prio * xlen / len,        /* compute new prio */
-                                                       targetTime);
+  coreAPI->connection_send_using_callback (peer, &fragmentBMC, fbmc, mtu, prio 
* xlen / len,    /* compute new prio */
+                                           targetTime);
 }
 
 /**
@@ -572,7 +571,7 @@
   int i;
 
   coreAPI = capi;
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats != NULL)
     {
       stat_defragmented =
@@ -623,7 +622,7 @@
     }
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   GNUNET_mutex_destroy (defragCacheLock);

Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c    2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/fs/ecrs/search.c    2007-12-15 04:41:05 UTC (rev 
5900)
@@ -176,7 +176,7 @@
                      &hk);
         GNUNET_hash_xor (&hk, &uri->data.sks.namespace, &keys[0]);      /* 
compute routing key r = H(identifier) ^ namespace */
         keys[1] = uri->data.sks.namespace;
-        addPS (GNUNET_ECRS_BLOCKTYPE_SIGNED, 2, &keys[0], 
&uri->data.sks.identifier,     /* identifier = decryption key */
+        addPS (GNUNET_ECRS_BLOCKTYPE_SIGNED, 2, &keys[0], 
&uri->data.sks.identifier,    /* identifier = decryption key */
                sqc);
         break;
       }
@@ -200,7 +200,7 @@
             pk = GNUNET_RSA_create_key_from_hash (&hc);
             GNUNET_RSA_get_public_key (pk, &pub);
             GNUNET_hash (&pub, sizeof (GNUNET_RSA_PublicKey), &query);
-            addPS (GNUNET_ECRS_BLOCKTYPE_ANY,    /* 
GNUNET_ECRS_BLOCKTYPE_KEYWORD, GNUNET_ECRS_BLOCKTYPE_NAMESPACE or 
GNUNET_ECRS_BLOCKTYPE_KEYWORD_FOR_NAMESPACE ok */
+            addPS (GNUNET_ECRS_BLOCKTYPE_ANY,   /* 
GNUNET_ECRS_BLOCKTYPE_KEYWORD, GNUNET_ECRS_BLOCKTYPE_NAMESPACE or 
GNUNET_ECRS_BLOCKTYPE_KEYWORD_FOR_NAMESPACE ok */
                    1, &query, &hc, sqc);
             GNUNET_RSA_free_key (pk);
           }

Modified: GNUnet/src/applications/fs/ecrs/unindex.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/unindex.c   2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/fs/ecrs/unindex.c   2007-12-15 04:41:05 UTC (rev 
5900)
@@ -251,8 +251,7 @@
       iblocks[i]->prio = htonl (0);
       iblocks[i]->type = htonl (GNUNET_ECRS_BLOCKTYPE_DATA);
       iblocks[i]->expirationTime = GNUNET_htonll (0);
-      ((DBlock *) & iblocks[i][1])->type =
-        htonl (GNUNET_ECRS_BLOCKTYPE_DATA);
+      ((DBlock *) & iblocks[i][1])->type = htonl (GNUNET_ECRS_BLOCKTYPE_DATA);
     }
 
   pos = 0;

Modified: GNUnet/src/applications/fs/ecrs/upload.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/upload.c    2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/fs/ecrs/upload.c    2007-12-15 04:41:05 UTC (rev 
5900)
@@ -254,8 +254,7 @@
       iblocks[i]->prio = htonl (priority);
       iblocks[i]->type = htonl (GNUNET_ECRS_BLOCKTYPE_DATA);
       iblocks[i]->expirationTime = GNUNET_htonll (expirationTime);
-      ((DBlock *) & iblocks[i][1])->type =
-        htonl (GNUNET_ECRS_BLOCKTYPE_DATA);
+      ((DBlock *) & iblocks[i][1])->type = htonl (GNUNET_ECRS_BLOCKTYPE_DATA);
     }
 
   pos = 0;

Modified: GNUnet/src/applications/fs/ecrs_core.c
===================================================================
--- GNUnet/src/applications/fs/ecrs_core.c      2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/fs/ecrs_core.c      2007-12-15 04:41:05 UTC (rev 
5900)
@@ -131,7 +131,7 @@
   if (size <= 4)
     {
       GNUNET_GE_BREAK (NULL, 0);
-      return GNUNET_ECRS_BLOCKTYPE_ANY;  /* signal error */
+      return GNUNET_ECRS_BLOCKTYPE_ANY; /* signal error */
     }
   return ntohl (*((const unsigned int *) data));
 }

Modified: GNUnet/src/applications/fs/ecrs_core_test.c
===================================================================
--- GNUnet/src/applications/fs/ecrs_core_test.c 2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/fs/ecrs_core_test.c 2007-12-15 04:41:05 UTC (rev 
5900)
@@ -53,8 +53,7 @@
   GNUNET_free (value);
   CHECK (GNUNET_YES ==
          GNUNET_EC_is_block_applicable_for_query
-         (GNUNET_ECRS_BLOCKTYPE_DATA, len, data, &query, 1, &query),
-         data);
+         (GNUNET_ECRS_BLOCKTYPE_DATA, len, data, &query, 1, &query), data);
   GNUNET_free (data);
   return 0;
 }

Modified: GNUnet/src/applications/fs/module/dht_push.c
===================================================================
--- GNUnet/src/applications/fs/module/dht_push.c        2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/fs/module/dht_push.c        2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -126,13 +126,13 @@
 {
   coreAPI = capi;
   dht = d;
-  sqstore = capi->GNUNET_CORE_request_service ("sqstore");
+  sqstore = capi->request_service ("sqstore");
   if (sqstore == NULL)
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
       return;
     }
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     stat_push_count
       = stats->create (gettext_noop ("# blocks pushed into DHT"));
@@ -155,10 +155,10 @@
       GNUNET_thread_stop_sleep (thread);
       GNUNET_thread_join (thread, &unused);
     }
-  coreAPI->GNUNET_CORE_release_service (sqstore);
+  coreAPI->release_service (sqstore);
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   coreAPI = NULL;

Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c      2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/fs/module/fs.c      2007-12-15 04:41:05 UTC (rev 
5900)
@@ -45,12 +45,23 @@
 
 #define DEBUG_FS GNUNET_NO
 
-typedef struct
+struct DHT_GET_CLS
 {
+
+  struct DHT_GET_CLS *next;
+
   struct GNUNET_DHT_GetHandle *rec;
+
+  struct GNUNET_ClientHandle *sock;
+
+  GNUNET_CronTime expires;
+
+  GNUNET_HashCode key;
+
   unsigned int prio;
-} DHT_GET_CLS;
 
+};
+
 typedef struct LG_Job
 {
   unsigned int keyCount;
@@ -60,6 +71,11 @@
 } LG_Job;
 
 /**
+ * DHT GET operations that are currently pending.
+ */
+static struct DHT_GET_CLS *dht_pending;
+
+/**
  * Global core API.
  */
 static GNUNET_CoreAPIForPlugins *coreAPI;
@@ -239,7 +255,7 @@
 get_result_callback (const GNUNET_HashCode * query,
                      const GNUNET_DataContainer * value, void *ctx)
 {
-  DHT_GET_CLS *cls = ctx;
+  struct DHT_GET_CLS *cls = ctx;
   const GapWrapper *gw;
   unsigned int size;
   GNUNET_HashCode hc;
@@ -268,14 +284,6 @@
   return GNUNET_OK;
 }
 
-static void
-get_complete_callback (void *ctx)
-{
-  DHT_GET_CLS *cls = ctx;
-  dht->get_stop (cls->rec);
-  GNUNET_free (cls);
-}
-
 /**
  * Stop processing a query.
  *
@@ -286,6 +294,8 @@
                           const GNUNET_MessageHeader * req)
 {
   const CS_fs_request_search_MESSAGE *rs;
+  struct DHT_GET_CLS *pos;
+  struct DHT_GET_CLS *prev;
 #if DEBUG_FS
   GNUNET_EncName enc;
 #endif
@@ -308,6 +318,27 @@
                       sizeof (CS_fs_request_search_MESSAGE)) /
                  sizeof (GNUNET_HashCode), &rs->query[0]);
   untrackQuery (&rs->query[0], sock);
+  GNUNET_mutex_lock (lock);
+  prev = NULL;
+  pos = dht_pending;
+  while (pos != NULL)
+    {
+      if ((pos->sock == sock) &&
+          (0 == memcmp (&pos->key, &rs->query[0], sizeof (GNUNET_HashCode))))
+        {
+          if (prev == NULL)
+            dht_pending = pos->next;
+          else
+            prev->next = pos->next;
+          dht->get_stop (pos->rec);
+          GNUNET_free (pos);
+          break;
+        }
+      prev = pos;
+      pos = pos->next;
+    }
+  GNUNET_mutex_unlock (lock);
+
   return GNUNET_OK;
 }
 
@@ -332,9 +363,9 @@
 
   cectx =
     coreAPI->
-    GNUNET_CORE_cs_create_client_log_context (GNUNET_GE_USER |
-                                              GNUNET_GE_EVENTKIND |
-                                              GNUNET_GE_ROUTEKIND, sock);
+    cs_create_client_log_context (GNUNET_GE_USER |
+                                  GNUNET_GE_EVENTKIND |
+                                  GNUNET_GE_ROUTEKIND, sock);
   if (ntohs (req->size) < sizeof (CS_fs_request_insert_MESSAGE))
     {
       GNUNET_GE_BREAK (ectx, 0);
@@ -448,9 +479,9 @@
 
   cectx =
     coreAPI->
-    GNUNET_CORE_cs_create_client_log_context (GNUNET_GE_USER |
-                                              GNUNET_GE_EVENTKIND |
-                                              GNUNET_GE_ROUTEKIND, sock);
+    cs_create_client_log_context (GNUNET_GE_USER |
+                                  GNUNET_GE_EVENTKIND |
+                                  GNUNET_GE_ROUTEKIND, sock);
   if (ntohs (req->size) < sizeof (CS_fs_request_init_index_MESSAGE))
     {
       GNUNET_GE_BREAK (ectx, 0);
@@ -501,9 +532,9 @@
 
   cectx =
     coreAPI->
-    GNUNET_CORE_cs_create_client_log_context (GNUNET_GE_USER |
-                                              GNUNET_GE_EVENTKIND |
-                                              GNUNET_GE_ROUTEKIND, sock);
+    cs_create_client_log_context (GNUNET_GE_USER |
+                                  GNUNET_GE_EVENTKIND |
+                                  GNUNET_GE_ROUTEKIND, sock);
   if (ntohs (req->size) < sizeof (CS_fs_request_index_MESSAGE))
     {
       GNUNET_GE_BREAK (ectx, 0);
@@ -588,9 +619,9 @@
 
   cectx =
     coreAPI->
-    GNUNET_CORE_cs_create_client_log_context (GNUNET_GE_USER |
-                                              GNUNET_GE_EVENTKIND |
-                                              GNUNET_GE_ROUTEKIND, sock);
+    cs_create_client_log_context (GNUNET_GE_USER |
+                                  GNUNET_GE_EVENTKIND |
+                                  GNUNET_GE_ROUTEKIND, sock);
   if (ntohs (req->size) < sizeof (CS_fs_request_delete_MESSAGE))
     {
       GNUNET_GE_BREAK (ectx, 0);
@@ -666,9 +697,9 @@
 
   cectx =
     coreAPI->
-    GNUNET_CORE_cs_create_client_log_context (GNUNET_GE_USER |
-                                              GNUNET_GE_EVENTKIND |
-                                              GNUNET_GE_ROUTEKIND, sock);
+    cs_create_client_log_context (GNUNET_GE_USER |
+                                  GNUNET_GE_EVENTKIND |
+                                  GNUNET_GE_ROUTEKIND, sock);
   if (ntohs (req->size) != sizeof (CS_fs_request_unindex_MESSAGE))
     {
       GNUNET_GE_BREAK (ectx, 0);
@@ -786,8 +817,7 @@
 
   et = GNUNET_ntohll (value->expirationTime);
   now = GNUNET_get_time ();
-  if ((et <= now)
-      && (ntohl (value->type) != GNUNET_ECRS_BLOCKTYPE_DATA))
+  if ((et <= now) && (ntohl (value->type) != GNUNET_ECRS_BLOCKTYPE_DATA))
     {
       /* content expired and not just data -- drop! */
       GNUNET_free_non_null (xvalue);
@@ -913,16 +943,16 @@
   myClosure.resultCallback = resultCallback;
   myClosure.resCallbackClosure = resCallbackClosure;
   ret = GNUNET_OK;
-  if (type == GNUNET_ECRS_BLOCKTYPE_DATA)     
+  if (type == GNUNET_ECRS_BLOCKTYPE_DATA)
     ret = datastore->get (&keys[0],
-                         GNUNET_ECRS_BLOCKTYPE_ONDEMAND,
-                         &gapGetConverter, &myClosure);    
+                          GNUNET_ECRS_BLOCKTYPE_ONDEMAND,
+                          &gapGetConverter, &myClosure);
   if (myClosure.count == 0)
     ret = datastore->get (&keys[0], type, &gapGetConverter, &myClosure);
   if (ret != GNUNET_SYSERR)
-    ret = myClosure.count; /* return number of actual
-                             results (unfiltered) that
-                             were found */
+    ret = myClosure.count;      /* return number of actual
+                                   results (unfiltered) that
+                                   were found */
   return ret;
 }
 
@@ -1168,17 +1198,24 @@
   if ((ntohl (rs->anonymityLevel) == 0) && (have_target == GNUNET_NO)
       && (dht != NULL))
     {
-      DHT_GET_CLS *cls;
+      struct DHT_GET_CLS *cls;
 
-      cls = GNUNET_malloc (sizeof (DHT_GET_CLS));
+      cls = GNUNET_malloc (sizeof (struct DHT_GET_CLS));
+      cls->sock = sock;
       cls->prio = ntohl (rs->prio);
+      cls->key = rs->query[0];
       cls->rec = dht->get_start (type,
-                                 &rs->query[0],
-                                 GNUNET_ntohll (rs->expiration),
-                                 &get_result_callback,
-                                 cls, &get_complete_callback, cls);
+                                 &rs->query[0], &get_result_callback, cls);
+      cls->expires = GNUNET_ntohll (rs->expiration);
       if (cls->rec == NULL)
         GNUNET_free (cls);      /* should never happen... */
+      else
+        {
+          GNUNET_mutex_lock (lock);
+          cls->next = dht_pending;
+          dht_pending = cls;
+          GNUNET_mutex_unlock (lock);
+        }
     }
   return GNUNET_OK;
 }
@@ -1190,6 +1227,37 @@
 }
 
 /**
+ * Method called whenever a given client disconnects.
+ */
+static void
+csHandleClientExit (struct GNUNET_ClientHandle *client)
+{
+  struct DHT_GET_CLS *pos;
+  struct DHT_GET_CLS *prev;
+
+  GNUNET_mutex_lock (lock);
+  prev = NULL;
+  pos = dht_pending;
+  while (pos != NULL)
+    {
+      if (pos->sock == client)
+        {
+          if (prev == NULL)
+            dht_pending = pos->next;
+          else
+            prev->next = pos->next;
+          dht->get_stop (pos->rec);
+          GNUNET_free (pos);
+         pos = prev->next;
+          continue;
+        }
+      prev = pos;
+      pos = pos->next;
+    }
+  GNUNET_mutex_unlock (lock);
+}
+
+/**
  * Initialize the FS module. This method name must match
  * the library name (libgnunet_XXX => initialize_XXX).
  *
@@ -1229,14 +1297,14 @@
                      "QUOTA", "FS");
       return GNUNET_SYSERR;
     }
-  datastore = capi->GNUNET_CORE_request_service ("datastore");
+  datastore = capi->request_service ("datastore");
   if (datastore == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
       return GNUNET_SYSERR;
     }
-  traffic = capi->GNUNET_CORE_request_service ("traffic");
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  traffic = capi->request_service ("traffic");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_expired_replies_dropped
@@ -1244,17 +1312,17 @@
       stat_valid_replies_received
         = stats->create (gettext_noop ("# FS valid replies received"));
     }
-  gap = capi->GNUNET_CORE_request_service ("gap");
+  gap = capi->request_service ("gap");
   if (gap == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
-      capi->GNUNET_CORE_release_service (datastore);
+      capi->release_service (datastore);
       if (stats != NULL)
-        capi->GNUNET_CORE_release_service (stats);
-      capi->GNUNET_CORE_release_service (traffic);
+        capi->release_service (stats);
+      capi->release_service (traffic);
       return GNUNET_SYSERR;
     }
-  dht = capi->GNUNET_CORE_request_service ("dht");
+  dht = capi->request_service ("dht");
   if (dht != NULL)
     init_dht_push (capi, dht);
   ltgSignal = GNUNET_semaphore_create (0);
@@ -1288,6 +1356,9 @@
 
   GNUNET_GE_ASSERT (ectx,
                     GNUNET_SYSERR !=
+                    capi->cs_exit_handler_register (&csHandleClientExit));
+  GNUNET_GE_ASSERT (ectx,
+                    GNUNET_SYSERR !=
                     capi->
                     registerClientHandler (GNUNET_CS_PROTO_GAP_QUERY_START,
                                            &csHandleRequestQueryStart));
@@ -1351,6 +1422,10 @@
   GNUNET_GE_ASSERT (ectx,
                     GNUNET_SYSERR !=
                     coreAPI->
+                    cs_exit_handler_unregister (&csHandleClientExit));
+  GNUNET_GE_ASSERT (ectx,
+                    GNUNET_SYSERR !=
+                    coreAPI->
                     unregisterClientHandler (GNUNET_CS_PROTO_GAP_QUERY_START,
                                              &csHandleRequestQueryStart));
   GNUNET_GE_ASSERT (ectx,
@@ -1404,24 +1479,24 @@
   GNUNET_semaphore_up (ltgSignal);      /* lg_jobs == NULL => thread will 
terminate */
   GNUNET_thread_join (localGetProcessor, &unused);
   doneQueryManager ();
-  coreAPI->GNUNET_CORE_release_service (datastore);
+  coreAPI->release_service (datastore);
   datastore = NULL;
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
-  coreAPI->GNUNET_CORE_release_service (gap);
+  coreAPI->release_service (gap);
   gap = NULL;
   if (dht != NULL)
     {
       done_dht_push ();
-      coreAPI->GNUNET_CORE_release_service (dht);
+      coreAPI->release_service (dht);
       dht = NULL;
     }
   if (traffic != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (traffic);
+      coreAPI->release_service (traffic);
       traffic = NULL;
     }
   coreAPI = NULL;

Modified: GNUnet/src/applications/fs/module/migration.c
===================================================================
--- GNUnet/src/applications/fs/module/migration.c       2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/fs/module/migration.c       2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -146,7 +146,7 @@
   unsigned int dist;
   unsigned int minDist;
 
-  index = coreAPI->GNUNET_CORE_connection_compute_index_of_peer (receiver);
+  index = coreAPI->connection_compute_index_of_peer (receiver);
   GNUNET_mutex_lock (lock);
   now = GNUNET_get_time ();
   entry = -1;
@@ -373,9 +373,9 @@
   dht = d;
   traffic = t;
   coreAPI->
-    GNUNET_CORE_connection_register_send_callback
+    connection_register_send_callback
     (GNUNET_GAP_ESTIMATED_DATA_SIZE, &activeMigrationCallback);
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_migration_count
@@ -394,11 +394,11 @@
 {
   int i;
   coreAPI->
-    GNUNET_CORE_connection_unregister_send_callback
+    connection_unregister_send_callback
     (GNUNET_GAP_ESTIMATED_DATA_SIZE, &activeMigrationCallback);
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   datastore = NULL;

Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c        2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/fs/module/ondemand.c        2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -253,7 +253,7 @@
                  "Storing on-demand content for query `%s'\n", &enc);
 #endif
 
-  ret = datastore->putUpdate(&key, &odb.header);
+  ret = datastore->putUpdate (&key, &odb.header);
   return ret;
 }
 
@@ -623,7 +623,7 @@
       odb.fileId = *fileId;
       /* compute the primary key */
       GNUNET_EC_file_block_get_query (block, delta + sizeof (DBlock), &key);
-      if (GNUNET_SYSERR == datastore->get (&key, 
GNUNET_ECRS_BLOCKTYPE_ONDEMAND, &completeValue, &odb.header))   /* aborted == 
found! */
+      if (GNUNET_SYSERR == datastore->get (&key, 
GNUNET_ECRS_BLOCKTYPE_ONDEMAND, &completeValue, &odb.header))  /* aborted == 
found! */
         ret = datastore->del (&key, &odb.header);
       else                      /* not found */
         ret = GNUNET_SYSERR;
@@ -657,7 +657,7 @@
   char *tmp;
 
   coreAPI = capi;
-  state = capi->GNUNET_CORE_request_service ("state");
+  state = capi->request_service ("state");
   if (state == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
@@ -684,7 +684,7 @@
 int
 ONDEMAND_done ()
 {
-  coreAPI->GNUNET_CORE_release_service (state);
+  coreAPI->release_service (state);
   state = NULL;
   GNUNET_free (index_directory);
   return GNUNET_OK;

Modified: GNUnet/src/applications/fs/module/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/module/querymanager.c    2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/fs/module/querymanager.c    2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -199,8 +199,8 @@
 #endif
           if (stats != NULL)
             stats->change (stat_replies_transmitted, 1);
-          coreAPI->GNUNET_CORE_cs_send_to_client (trackers[i]->client,
-                                                  &rc->header, GNUNET_NO);
+          coreAPI->cs_send_to_client (trackers[i]->client,
+                                      &rc->header, GNUNET_NO);
           GNUNET_free (rc);
         }
     }
@@ -223,10 +223,10 @@
 {
   coreAPI = capi;
   ectx = capi->ectx;
-  capi->GNUNET_CORE_cs_register_exit_handler (&ceh);
+  capi->cs_exit_handler_register (&ceh);
   GNUNET_array_grow (trackers, trackerSize, 64);
   queryManagerLock = GNUNET_mutex_create (GNUNET_NO);
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_queries_tracked
@@ -252,11 +252,11 @@
   if (stats != NULL)
     {
       stats->set (stat_queries_tracked, 0);
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
 
-  coreAPI->GNUNET_CORE_cs_exit_handler_unregister (&ceh);
+  coreAPI->cs_exit_handler_unregister (&ceh);
   GNUNET_mutex_destroy (queryManagerLock);
   queryManagerLock = NULL;
   coreAPI = NULL;

Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c   2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/applications/gap/gap.c   2007-12-15 04:41:05 UTC (rev 5900)
@@ -233,7 +233,7 @@
     return QUERY_ANSWER | QUERY_FORWARD;
   else if (netLoad < 100)
     return QUERY_ANSWER;
-  return 0;                   /* drop entirely */
+  return 0;                     /* drop entirely */
 }
 
 /**
@@ -2223,7 +2223,7 @@
   GNUNET_GE_ASSERT (ectx, sizeof (P2P_gap_reply_MESSAGE) == 68);
   GNUNET_GE_ASSERT (ectx, sizeof (P2P_gap_query_MESSAGE) == 144);
 
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_routing_totals =
@@ -2281,11 +2281,11 @@
   GNUNET_array_grow (rewards, rewardSize, MAX_REWARD_TRACKS);
 
 
-  identity = coreAPI->GNUNET_CORE_request_service ("identity");
+  identity = coreAPI->request_service ("identity");
   GNUNET_GE_ASSERT (ectx, identity != NULL);
-  topology = coreAPI->GNUNET_CORE_request_service ("topology");
+  topology = coreAPI->request_service ("topology");
   GNUNET_GE_ASSERT (ectx, topology != NULL);
-  traffic = coreAPI->GNUNET_CORE_request_service ("traffic");
+  traffic = coreAPI->request_service ("traffic");
   if (traffic == NULL)
     {
       GNUNET_GE_LOG (ectx,
@@ -2309,7 +2309,7 @@
       queries[i].expires = 0;   /* all expired */
       queries[i].msg = NULL;
     }
-  lock = coreAPI->GNUNET_CORE_connection_get_lock ();
+  lock = coreAPI->connection_get_lock ();
   GNUNET_cron_add_job (capi->cron, &ageRTD, 2 * GNUNET_CRON_MINUTES,
                        2 * GNUNET_CRON_MINUTES, NULL);
 
@@ -2321,9 +2321,8 @@
   capi->registerHandler (GNUNET_P2P_PROTO_GAP_QUERY, &handleQuery);
   capi->registerHandler (GNUNET_P2P_PROTO_GAP_RESULT, &useContent);
   coreAPI->
-    GNUNET_CORE_connection_register_send_callback (sizeof
-                                                   (P2P_gap_query_MESSAGE),
-                                                   &fillInQuery);
+    connection_register_send_callback (sizeof
+                                       (P2P_gap_query_MESSAGE), &fillInQuery);
 
   api.init = &init;
   api.get_start = &get_start;
@@ -2344,9 +2343,9 @@
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_GAP_QUERY, &handleQuery);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_GAP_RESULT, &useContent);
   coreAPI->
-    GNUNET_CORE_connection_unregister_send_callback (sizeof
-                                                     (P2P_gap_query_MESSAGE),
-                                                     &fillInQuery);
+    connection_unregister_send_callback (sizeof
+                                         (P2P_gap_query_MESSAGE),
+                                         &fillInQuery);
 
   GNUNET_cron_del_job (coreAPI->cron, &ageRTD, 2 * GNUNET_CRON_MINUTES, NULL);
 
@@ -2375,13 +2374,13 @@
   for (i = 0; i < QUERY_RECORD_COUNT; i++)
     GNUNET_free_non_null (queries[i].msg);
 
-  coreAPI->GNUNET_CORE_release_service (identity);
+  coreAPI->release_service (identity);
   identity = NULL;
-  coreAPI->GNUNET_CORE_release_service (topology);
+  coreAPI->release_service (topology);
   topology = NULL;
   if (traffic != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (traffic);
+      coreAPI->release_service (traffic);
       traffic = NULL;
     }
   GNUNET_free (ROUTING_indTable_);
@@ -2390,7 +2389,7 @@
   if (stats != NULL)
     {
       stats->set (stat_pending_rewards, 0);
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   lock = NULL;

Modified: GNUnet/src/applications/getoption/getoption.c
===================================================================
--- GNUnet/src/applications/getoption/getoption.c       2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/getoption/getoption.c       2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -63,8 +63,7 @@
   rep->header.size = htons (sizeof (GNUNET_MessageHeader) + strlen (val) + 1);
   memcpy (rep->value, val, strlen (val) + 1);
   rep->header.type = htons (GNUNET_CS_PROTO_GET_OPTION_REPLY);
-  ret =
-    coreAPI->GNUNET_CORE_cs_send_to_client (sock, &rep->header, GNUNET_YES);
+  ret = coreAPI->cs_send_to_client (sock, &rep->header, GNUNET_YES);
   GNUNET_free (rep);
   GNUNET_free (val);
   return ret;

Modified: GNUnet/src/applications/identity/identity.c
===================================================================
--- GNUnet/src/applications/identity/identity.c 2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/identity/identity.c 2007-12-15 04:41:05 UTC (rev 
5900)
@@ -1221,10 +1221,9 @@
   hello = GNUNET_malloc (ntohs (msg->header.size));
   memcpy (hello, msg, ntohs (msg->header.size));
   hello->header.type = htons (GNUNET_P2P_PROTO_HELLO);
-  coreAPI->GNUNET_CORE_p2p_inject_message (NULL,
-                                           (const char *) hello,
-                                           ntohs (msg->header.size),
-                                           GNUNET_NO, NULL);
+  coreAPI->p2p_inject_message (NULL,
+                               (const char *) hello,
+                               ntohs (msg->header.size), GNUNET_NO, NULL);
   GNUNET_free (hello);
   return GNUNET_OK;
 }
@@ -1254,19 +1253,18 @@
   /* we cannot permanently load transport
      since that would cause a cyclic dependency;
      however, we can request it briefly here */
-  tapi = coreAPI->GNUNET_CORE_request_service ("transport");
+  tapi = coreAPI->request_service ("transport");
   if (tapi == NULL)
     return GNUNET_SYSERR;
   hello = NULL;
   pos = 0;
   while ((hello == NULL) && (types[pos] != 0))
     hello = tapi->createhello (types[pos++]);
-  coreAPI->GNUNET_CORE_release_service (tapi);
+  coreAPI->release_service (tapi);
   if (hello == NULL)
     return GNUNET_SYSERR;
   hello->header.type = htons (GNUNET_CS_PROTO_IDENTITY_HELLO);
-  ret =
-    coreAPI->GNUNET_CORE_cs_send_to_client (sock, &hello->header, GNUNET_YES);
+  ret = coreAPI->cs_send_to_client (sock, &hello->header, GNUNET_YES);
   GNUNET_free (hello);
   return ret;
 }
@@ -1285,8 +1283,7 @@
                              ntohs (message->size) -
                              sizeof (GNUNET_MessageHeader), &reply.sig))
     return GNUNET_SYSERR;
-  return coreAPI->GNUNET_CORE_cs_send_to_client (sock, &reply.header,
-                                                 GNUNET_YES);
+  return coreAPI->cs_send_to_client (sock, &reply.header, GNUNET_YES);
 }
 
 static int
@@ -1308,7 +1305,7 @@
   hello = identity2Hello (identity, protocol, GNUNET_YES);
   if (hello == NULL)
     return GNUNET_OK;           /* ignore -- happens if HELLO just expired */
-  transport = coreAPI->GNUNET_CORE_request_service ("transport");
+  transport = coreAPI->request_service ("transport");
   if (transport == NULL)
     {
       GNUNET_free (hello);
@@ -1319,7 +1316,7 @@
   address = NULL;
   transport->helloToAddress (hello, &address, &len);
   GNUNET_free (hello);
-  coreAPI->GNUNET_CORE_release_service (transport);
+  coreAPI->release_service (transport);
   if (len >= GNUNET_MAX_BUFFER_SIZE - sizeof (CS_identity_peer_info_MESSAGE))
     {
       GNUNET_free (address);
@@ -1340,8 +1337,7 @@
   reply->bpm = htonl (bpm);
   memcpy (&reply[1], address, len);
   GNUNET_free_non_null (address);
-  ret =
-    coreAPI->GNUNET_CORE_cs_send_to_client (sock, &reply->header, GNUNET_YES);
+  ret = coreAPI->cs_send_to_client (sock, &reply->header, GNUNET_YES);
   GNUNET_free (reply);
   return ret;
 }

Modified: GNUnet/src/applications/pingpong/pingpong.c
===================================================================
--- GNUnet/src/applications/pingpong/pingpong.c 2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/pingpong/pingpong.c 2007-12-15 04:41:05 UTC (rev 
5900)
@@ -175,10 +175,9 @@
   mytsession = transport->connectFreely (peer, GNUNET_YES, __FILE__);
   if (mytsession == NULL)
     return GNUNET_SYSERR;
-  ret = coreAPI->GNUNET_CORE_connection_send_plaintext (mytsession,
-                                                        (char *) msg,
-                                                        sizeof
-                                                        
(P2P_pingpong_MESSAGE));
+  ret = coreAPI->connection_send_plaintext (mytsession,
+                                            (char *) msg,
+                                            sizeof (P2P_pingpong_MESSAGE));
   transport->disconnect (mytsession, __FILE__);
   return ret;
 }
@@ -232,10 +231,9 @@
      transport may have been uni-directional! */
   ret = GNUNET_SYSERR;
   if (tsession != NULL)
-    ret = coreAPI->GNUNET_CORE_connection_send_plaintext (tsession,
-                                                          (char *) &pong,
-                                                          sizeof
-                                                          
(P2P_pingpong_MESSAGE));
+    ret = coreAPI->connection_send_plaintext (tsession,
+                                              (char *) &pong,
+                                              sizeof (P2P_pingpong_MESSAGE));
   if (ret != GNUNET_OK)
     ret = GNUNET_CORE_connection_send_plaintext (sender, &pong);
   if (ret == GNUNET_OK)
@@ -502,20 +500,20 @@
   ectx = capi->ectx;
   GNUNET_GE_ASSERT (ectx, sizeof (P2P_pingpong_MESSAGE) == 72);
   coreAPI = capi;
-  identity = capi->GNUNET_CORE_request_service ("identity");
+  identity = capi->request_service ("identity");
   if (identity == NULL)
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
       return NULL;
     }
-  transport = capi->GNUNET_CORE_request_service ("transport");
+  transport = capi->request_service ("transport");
   if (transport == NULL)
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
-      capi->GNUNET_CORE_release_service (identity);
+      capi->release_service (identity);
       return NULL;
     }
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_encryptedPongReceived
@@ -540,7 +538,7 @@
         create (gettext_noop ("# plaintext PONG transmissions failed"));
 
     }
-  pingPongLock = capi->GNUNET_CORE_connection_get_lock ();
+  pingPongLock = capi->connection_get_lock ();
   pingPongs =
     (PingPongEntry *) GNUNET_malloc (sizeof (PingPongEntry) * MAX_PING_PONG);
   memset (pingPongs, 0, sizeof (PingPongEntry) * MAX_PING_PONG);
@@ -551,10 +549,10 @@
                  "pingpong", GNUNET_P2P_PROTO_PING, GNUNET_P2P_PROTO_PONG);
   capi->registerHandler (GNUNET_P2P_PROTO_PING, &pingReceived);
   capi->registerHandler (GNUNET_P2P_PROTO_PONG, &pongReceived);
-  capi->GNUNET_CORE_plaintext_register_handler (GNUNET_P2P_PROTO_PING,
-                                                &plaintextPingReceived);
-  capi->GNUNET_CORE_plaintext_register_handler (GNUNET_P2P_PROTO_PONG,
-                                                &plaintextPongReceived);
+  capi->plaintext_register_handler (GNUNET_P2P_PROTO_PING,
+                                    &plaintextPingReceived);
+  capi->plaintext_register_handler (GNUNET_P2P_PROTO_PONG,
+                                    &plaintextPongReceived);
   ret.ping = &initiatePing;
   ret.pingUser = &createPing;
   ret.ping_size = sizeof (P2P_pingpong_MESSAGE);
@@ -569,21 +567,21 @@
 {
   int i;
 
-  coreAPI->GNUNET_CORE_release_service (stats);
+  coreAPI->release_service (stats);
   stats = NULL;
-  coreAPI->GNUNET_CORE_release_service (transport);
+  coreAPI->release_service (transport);
   transport = NULL;
-  coreAPI->GNUNET_CORE_release_service (identity);
+  coreAPI->release_service (identity);
   identity = NULL;
   for (i = 0; i < MAX_PING_PONG; i++)
     GNUNET_free_non_null (pingPongs[i].data);
   GNUNET_free (pingPongs);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_PING, &pingReceived);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_PONG, &pongReceived);
-  coreAPI->GNUNET_CORE_plaintext_unregister_handler (GNUNET_P2P_PROTO_PING,
-                                                     &plaintextPingReceived);
-  coreAPI->GNUNET_CORE_plaintext_unregister_handler (GNUNET_P2P_PROTO_PONG,
-                                                     &plaintextPongReceived);
+  coreAPI->plaintext_unregister_handler (GNUNET_P2P_PROTO_PING,
+                                         &plaintextPingReceived);
+  coreAPI->plaintext_unregister_handler (GNUNET_P2P_PROTO_PONG,
+                                         &plaintextPongReceived);
   coreAPI = NULL;
   return GNUNET_OK;
 }

Modified: GNUnet/src/applications/rpc/rpc.c
===================================================================
--- GNUnet/src/applications/rpc/rpc.c   2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/applications/rpc/rpc.c   2007-12-15 04:41:05 UTC (rev 5900)
@@ -1501,7 +1501,7 @@
   int rvalue;
 
   ectx = capi->ectx;
-  rpcLock = capi->GNUNET_CORE_connection_get_lock ();
+  rpcLock = capi->connection_get_lock ();
   coreAPI = capi;
   peerInformation = GNUNET_vector_create (16);
   incomingCalls = GNUNET_vector_create (16);
@@ -1611,7 +1611,7 @@
 
   GNUNET_GE_LOG (ectx, GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
                  "RPC testcase starting\n");
-  rpcAPI = capi->GNUNET_CORE_request_service ("rpc");
+  rpcAPI = capi->request_service ("rpc");
   if (rpcAPI == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
@@ -1667,7 +1667,7 @@
       GNUNET_GE_BREAK (ectx, 0);
       ret = GNUNET_SYSERR;
     }
-  if (GNUNET_OK != capi->GNUNET_CORE_release_service (rpcAPI))
+  if (GNUNET_OK != capi->release_service (rpcAPI))
     {
       GNUNET_GE_BREAK (ectx, 0);
       ret = GNUNET_SYSERR;

Modified: GNUnet/src/applications/session/connect.c
===================================================================
--- GNUnet/src/applications/session/connect.c   2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/session/connect.c   2007-12-15 04:41:05 UTC (rev 
5900)
@@ -172,7 +172,7 @@
   GNUNET_GE_ASSERT (ectx, hostId != NULL);
   if (stats != NULL)
     stats->change (stat_sessionEstablished, 1);
-  coreAPI->GNUNET_CORE_connection_mark_session_as_confirmed (hostId);
+  coreAPI->connection_mark_session_as_confirmed (hostId);
   GNUNET_free (hostId);
 }
 
@@ -480,9 +480,8 @@
 
   /* get or create our session key */
   if (GNUNET_OK !=
-      coreAPI->GNUNET_CORE_connection_get_session_key_of_peer (receiver, &sk,
-                                                               &age,
-                                                               GNUNET_YES))
+      coreAPI->connection_get_session_key_of_peer (receiver, &sk,
+                                                   &age, GNUNET_YES))
     {
       age = GNUNET_get_time_int32 (NULL);
       GNUNET_AES_create_session_key (&sk);
@@ -536,16 +535,14 @@
     }
   if (hello != NULL)
     {
-      coreAPI->GNUNET_CORE_connection_send_plaintext (tsession,
-                                                      (const char *) hello,
-                                                      GNUNET_sizeof_hello
-                                                      (hello));
+      coreAPI->connection_send_plaintext (tsession,
+                                          (const char *) hello,
+                                          GNUNET_sizeof_hello (hello));
       GNUNET_free (hello);
       hello = NULL;
-      coreAPI->GNUNET_CORE_connection_send_plaintext (tsession,
-                                                      (const char *) skey,
-                                                      ntohs (skey->header.
-                                                             size));
+      coreAPI->connection_send_plaintext (tsession,
+                                          (const char *) skey,
+                                          ntohs (skey->header.size));
     }
   GNUNET_free (skey);
   if (0 != memcmp (receiver, &tsession->peer, sizeof (GNUNET_PeerIdentity)))
@@ -557,9 +554,8 @@
       coreAPI->offerTSessionFor (receiver, tsession);
     }
   transport->disconnect (tsession, __FILE__);
-  coreAPI->GNUNET_CORE_connection_assign_session_key_to_peer (&sk, receiver,
-                                                              age,
-                                                              GNUNET_YES);
+  coreAPI->connection_assign_session_key_to_peer (&sk, receiver,
+                                                  age, GNUNET_YES);
   return GNUNET_OK;
 }
 
@@ -633,9 +629,9 @@
       return GNUNET_SYSERR;
     }
   if ((GNUNET_OK !=
-       coreAPI->GNUNET_CORE_connection_get_session_key_of_peer (sender, NULL,
-                                                                NULL,
-                                                                GNUNET_YES))
+       coreAPI->connection_get_session_key_of_peer (sender, NULL,
+                                                    NULL,
+                                                    GNUNET_YES))
       && ((GNUNET_YES == identity->isBlacklisted (sender, GNUNET_NO))
           || ((coreAPI->forAllConnectedNodes (NULL, NULL) >= 3)
               && (GNUNET_cpu_get_load (ectx, coreAPI->cfg) >
@@ -726,12 +722,11 @@
   if (stats != NULL)
     stats->change (stat_skeyAccepted, 1);
   /* notify core about session key */
-  coreAPI->GNUNET_CORE_connection_assign_session_key_to_peer (&key,
-                                                              sender,
-                                                              ntohl
-                                                              
(sessionkeySigned->
-                                                               creationTime),
-                                                              GNUNET_NO);
+  coreAPI->connection_assign_session_key_to_peer (&key,
+                                                  sender,
+                                                  ntohl
+                                                  (sessionkeySigned->
+                                                   creationTime), GNUNET_NO);
   pos = sizeof (P2P_setkey_MESSAGE);
   ping = NULL;
   pong = NULL;
@@ -806,10 +801,9 @@
                      "Received PONG in session key from `%s', injecting!\n",
                      &enc);
 #endif
-      coreAPI->GNUNET_CORE_p2p_inject_message (sender,
-                                               (char *) pong,
-                                               ntohs (pong->size), GNUNET_YES,
-                                               tsession);
+      coreAPI->p2p_inject_message (sender,
+                                   (char *) pong,
+                                   ntohs (pong->size), GNUNET_YES, tsession);
       if (ping != NULL)
         {                       /* should always be true for well-behaved 
peers */
           /* pong can go out over ordinary channels */
@@ -933,32 +927,32 @@
   ectx = capi->ectx;
   GNUNET_GE_ASSERT (ectx, sizeof (P2P_setkey_MESSAGE) == 520);
   coreAPI = capi;
-  identity = capi->GNUNET_CORE_request_service ("identity");
+  identity = capi->request_service ("identity");
   if (identity == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
       return NULL;
     }
-  transport = capi->GNUNET_CORE_request_service ("transport");
+  transport = capi->request_service ("transport");
   if (transport == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
-      coreAPI->GNUNET_CORE_release_service (identity);
+      coreAPI->release_service (identity);
       identity = NULL;
       return NULL;
     }
-  pingpong = capi->GNUNET_CORE_request_service ("pingpong");
+  pingpong = capi->request_service ("pingpong");
   if (pingpong == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
-      coreAPI->GNUNET_CORE_release_service (transport);
+      coreAPI->release_service (transport);
       transport = NULL;
-      coreAPI->GNUNET_CORE_release_service (identity);
+      coreAPI->release_service (identity);
       identity = NULL;
       return NULL;
     }
-  topology = capi->GNUNET_CORE_request_service ("topology");
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  topology = capi->request_service ("topology");
+  stats = capi->request_service ("stats");
   if (stats != NULL)
     {
       stat_skeySent = stats->create (gettext_noop ("# session keys sent"));
@@ -979,8 +973,8 @@
                  _
                  ("`%s' registering handler %d (plaintext and ciphertext)\n"),
                  "session", GNUNET_P2P_PROTO_SET_KEY);
-  coreAPI->GNUNET_CORE_plaintext_register_handler (GNUNET_P2P_PROTO_SET_KEY,
-                                                   &acceptSessionKey);
+  coreAPI->plaintext_register_handler (GNUNET_P2P_PROTO_SET_KEY,
+                                       &acceptSessionKey);
   coreAPI->registerHandler (GNUNET_P2P_PROTO_SET_KEY,
                             &acceptSessionKeyUpdate);
   ret.tryConnect = &tryConnect;
@@ -993,22 +987,22 @@
 int
 release_module_session ()
 {
-  coreAPI->GNUNET_CORE_plaintext_unregister_handler (GNUNET_P2P_PROTO_SET_KEY,
-                                                     &acceptSessionKey);
+  coreAPI->plaintext_unregister_handler (GNUNET_P2P_PROTO_SET_KEY,
+                                         &acceptSessionKey);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_SET_KEY,
                               &acceptSessionKeyUpdate);
   if (topology != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (topology);
+      coreAPI->release_service (topology);
       topology = NULL;
     }
-  coreAPI->GNUNET_CORE_release_service (stats);
+  coreAPI->release_service (stats);
   stats = NULL;
-  coreAPI->GNUNET_CORE_release_service (identity);
+  coreAPI->release_service (identity);
   identity = NULL;
-  coreAPI->GNUNET_CORE_release_service (transport);
+  coreAPI->release_service (transport);
   transport = NULL;
-  coreAPI->GNUNET_CORE_release_service (pingpong);
+  coreAPI->release_service (pingpong);
   pingpong = NULL;
   coreAPI = NULL;
   return GNUNET_OK;

Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c       2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c       2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -1478,7 +1478,7 @@
 
   ectx = capi->ectx;
   coreAPI = capi;
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats)
     stat_size = stats->create (gettext_noop ("# bytes in datastore"));
 
@@ -1514,7 +1514,7 @@
                                    GNUNET_GE_ERROR | GNUNET_GE_ADMIN |
                                    GNUNET_GE_BULK, "fopen", cnffile);
       if (stats != NULL)
-        coreAPI->GNUNET_CORE_release_service (stats);
+        coreAPI->release_service (stats);
       GNUNET_free (cnffile);
       return NULL;
     }
@@ -1535,12 +1535,12 @@
                      ("Failed to load MySQL database module.  Check that MySQL 
is running and configured properly!\n"));
       dbh = NULL;
       if (stats != NULL)
-        coreAPI->GNUNET_CORE_release_service (stats);
+        coreAPI->release_service (stats);
       return NULL;
     }
 
   lock = GNUNET_mutex_create (GNUNET_NO);
-  state = coreAPI->GNUNET_CORE_request_service ("state");
+  state = coreAPI->request_service ("state");
   sb = NULL;
   if (sizeof (unsigned long long)
       != state->read (ectx, "mysql-size", (void *) &sb))
@@ -1584,7 +1584,7 @@
          the outdated state file! */
       state->unlink (ectx, "mysql-size");
     }
-  coreAPI->GNUNET_CORE_release_service (state);
+  coreAPI->release_service (state);
   api.getSize = &getSize;
   api.put = &put;
   api.get = &get;
@@ -1611,12 +1611,12 @@
   GNUNET_free (dbh);
   dbh = NULL;
   if (stats != NULL)
-    coreAPI->GNUNET_CORE_release_service (stats);
+    coreAPI->release_service (stats);
   GNUNET_mutex_destroy (lock);
-  state = coreAPI->GNUNET_CORE_request_service ("state");
+  state = coreAPI->request_service ("state");
   state->write (ectx,
                 "mysql-size", sizeof (unsigned long long), &content_size);
-  coreAPI->GNUNET_CORE_release_service (state);
+  coreAPI->release_service (state);
   mysql_library_end ();
   ectx = NULL;
   coreAPI = NULL;

Modified: GNUnet/src/applications/sqstore_mysql/mysqltest.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysqltest.c   2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/sqstore_mysql/mysqltest.c   2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -169,11 +169,9 @@
     }
   ASSERT (oldSize < api->getSize ());
   ASSERT (256 ==
-          api->iterateLowPriority (GNUNET_ECRS_BLOCKTYPE_ANY, NULL,
-                                   NULL));
+          api->iterateLowPriority (GNUNET_ECRS_BLOCKTYPE_ANY, NULL, NULL));
   ASSERT (256 ==
-          api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY, NULL,
-                                      NULL));
+          api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY, NULL, NULL));
   for (i = 255; i >= 0; i--)
     {
       memset (&key, 256 - i, sizeof (GNUNET_HashCode));
@@ -237,8 +235,7 @@
           api->iterateAllNow ((GNUNET_DatastoreValueIterator) & iterateDelete,
                               api));
   ASSERT (0 ==
-          api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY, NULL,
-                                      NULL));
+          api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY, NULL, NULL));
   api->drop ();
 
   return GNUNET_OK;

Modified: GNUnet/src/applications/sqstore_sqlite/sqlite.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlite.c     2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/sqstore_sqlite/sqlite.c     2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -170,26 +170,24 @@
 {
   /* create indices */
   sqlite3_exec (dbh,
-               "CREATE INDEX idx_hash ON gn070 (hash)",
-               NULL, NULL, ENULL);
+                "CREATE INDEX idx_hash ON gn070 (hash)", NULL, NULL, ENULL);
   sqlite3_exec (dbh,
-               "CREATE INDEX idx_prio ON gn070 (prio)",
-               NULL, NULL, ENULL);
+                "CREATE INDEX idx_prio ON gn070 (prio)", NULL, NULL, ENULL);
   sqlite3_exec (dbh,
-               "CREATE INDEX idx_expire ON gn070 (expire)",
-               NULL, NULL, ENULL);
+                "CREATE INDEX idx_expire ON gn070 (expire)",
+                NULL, NULL, ENULL);
   sqlite3_exec (dbh, "DROP INDEX idx_comb1", NULL, NULL, ENULL);
   sqlite3_exec (dbh, "DROP INDEX idx_comb2", NULL, NULL, ENULL);
   sqlite3_exec (dbh, "DROP INDEX idx_comb6", NULL, NULL, ENULL);
   sqlite3_exec (dbh,
-               "CREATE INDEX idx_comb3 ON gn070 (prio,anonLevel)",
-               NULL, NULL, ENULL);
+                "CREATE INDEX idx_comb3 ON gn070 (prio,anonLevel)",
+                NULL, NULL, ENULL);
   sqlite3_exec (dbh,
-               "CREATE INDEX idx_comb4 ON gn070 (prio,hash,anonLevel)",
-               NULL, NULL, ENULL);
+                "CREATE INDEX idx_comb4 ON gn070 (prio,hash,anonLevel)",
+                NULL, NULL, ENULL);
   sqlite3_exec (dbh,
-               "CREATE INDEX idx_comb5 ON gn070 (expire,hash)",
-               NULL, NULL, ENULL);
+                "CREATE INDEX idx_comb5 ON gn070 (expire,hash)",
+                NULL, NULL, ENULL);
 }
 
 /**
@@ -1394,7 +1392,7 @@
     }
   lock = GNUNET_mutex_create (GNUNET_NO);
   coreAPI = capi;
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats)
     stat_size = stats->create (gettext_noop ("# bytes in datastore"));
 
@@ -1418,7 +1416,7 @@
 release_module_sqstore_sqlite ()
 {
   if (stats != NULL)
-    coreAPI->GNUNET_CORE_release_service (stats);
+    coreAPI->release_service (stats);
   sqlite_shutdown ();
 #if DEBUG_SQLITE
   GNUNET_GE_LOG (ectx,

Modified: GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -175,11 +175,9 @@
       ASSERT (1 == api->get (&key, i, &checkValue, (void *) &i));
     }
   ASSERT (256 ==
-          api->iterateLowPriority (GNUNET_ECRS_BLOCKTYPE_ANY, NULL,
-                                   NULL));
+          api->iterateLowPriority (GNUNET_ECRS_BLOCKTYPE_ANY, NULL, NULL));
   ASSERT (256 ==
-          api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY, NULL,
-                                      NULL));
+          api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY, NULL, NULL));
   for (i = 255; i >= 0; i--)
     {
       memset (&key, 256 - i, sizeof (GNUNET_HashCode));
@@ -246,8 +244,7 @@
           api->iterateAllNow ((GNUNET_DatastoreValueIterator) & iterateDelete,
                               api));
   ASSERT (0 ==
-          api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY, NULL,
-                                      NULL));
+          api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY, NULL, NULL));
   api->drop ();
 
   return GNUNET_OK;

Modified: GNUnet/src/applications/stats/sqstats.c
===================================================================
--- GNUnet/src/applications/stats/sqstats.c     2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/stats/sqstats.c     2007-12-15 04:41:05 UTC (rev 
5900)
@@ -145,7 +145,7 @@
 static int
 init_sqstore_stats ()
 {
-  sq = myCoreAPI->GNUNET_CORE_request_service ("sqstore");
+  sq = myCoreAPI->request_service ("sqstore");
   if (sq == NULL)
     return GNUNET_SYSERR;
   stat_block[0] = stats->create (gettext_noop ("# Any-Blocks"));
@@ -175,6 +175,6 @@
 {
   if (sq == NULL)
     return;
-  myCoreAPI->GNUNET_CORE_release_service (sq);
+  myCoreAPI->release_service (sq);
   sq = NULL;
 }

Modified: GNUnet/src/applications/stats/statistics.c
===================================================================
--- GNUnet/src/applications/stats/statistics.c  2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/stats/statistics.c  2007-12-15 04:41:05 UTC (rev 
5900)
@@ -337,8 +337,7 @@
          ntohs(statMsg->header.size),
          start, end, statCounters); */
       if (GNUNET_SYSERR ==
-          coreAPI->GNUNET_CORE_cs_send_to_client (sock, &statMsg->header,
-                                                  GNUNET_YES))
+          coreAPI->cs_send_to_client (sock, &statMsg->header, GNUNET_YES))
         break;                  /* abort, socket error! */
       start = end;
     }
@@ -366,7 +365,7 @@
   cmsg = (CS_stats_get_supported_MESSAGE *) message;
   type = ntohs (cmsg->type);
   htype = ntohs (cmsg->handlerType);
-  supported = coreAPI->GNUNET_CORE_p2p_test_handler_registered (type, htype);
+  supported = coreAPI->p2p_test_handler_registered (type, htype);
   return coreAPI->sendValueToClient (sock, supported);
 }
 
@@ -408,7 +407,7 @@
 {
   GNUNET_GE_ASSERT (capi->ectx, myCoreAPI == NULL);
   myCoreAPI = capi;
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   if (stats == NULL)
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
@@ -469,7 +468,7 @@
   coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_TRAFFIC_COUNT,
                                     &processGetConnectionCountRequest);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_NOISE, &processNoise);
-  myCoreAPI->GNUNET_CORE_release_service (stats);
+  myCoreAPI->release_service (stats);
   stats = NULL;
   myCoreAPI = NULL;
   return GNUNET_OK;

Modified: GNUnet/src/applications/tbench/tbench.c
===================================================================
--- GNUnet/src/applications/tbench/tbench.c     2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/tbench/tbench.c     2007-12-15 04:41:05 UTC (rev 
5900)
@@ -384,8 +384,7 @@
   reply.variance_loss = sum_variance_loss / (iterations - 1);
   GNUNET_free (results);
   results = NULL;
-  return coreAPI->GNUNET_CORE_cs_send_to_client (client, &reply.header,
-                                                 GNUNET_YES);
+  return coreAPI->cs_send_to_client (client, &reply.header, GNUNET_YES);
 }
 
 /**

Modified: GNUnet/src/applications/template/template.c
===================================================================
--- GNUnet/src/applications/template/template.c 2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/template/template.c 2007-12-15 04:41:05 UTC (rev 
5900)
@@ -73,8 +73,7 @@
   if (GNUNET_SYSERR ==
       capi->registerHandler (GNUNET_P2P_PROTO_MAX_USED, &handlep2pMSG))
     ok = GNUNET_SYSERR;
-  if (GNUNET_SYSERR ==
-      capi->GNUNET_CORE_cs_register_exit_handler (&clientExitHandler))
+  if (GNUNET_SYSERR == capi->cs_exit_handler_register (&clientExitHandler))
     ok = GNUNET_SYSERR;
   if (GNUNET_SYSERR ==
       capi->registerClientHandler (GNUNET_CS_PROTO_MAX_USED, &csHandle))
@@ -86,7 +85,7 @@
 done_module_template ()
 {
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_MAX_USED, &handlep2pMSG);
-  coreAPI->GNUNET_CORE_cs_exit_handler_unregister (&clientExitHandler);
+  coreAPI->cs_exit_handler_unregister (&clientExitHandler);
   coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_MAX_USED, &csHandle);
   GNUNET_mutex_destroy (lock);
   coreAPI = NULL;

Modified: GNUnet/src/applications/testbed/testbed.c
===================================================================
--- GNUnet/src/applications/testbed/testbed.c   2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/testbed/testbed.c   2007-12-15 04:41:05 UTC (rev 
5900)
@@ -106,14 +106,14 @@
 static void
 tb_DEL_PEER (GNUNET_ClientHandle client, TESTBED_DEL_PEER_MESSAGE * msg)
 {
-  coreAPI->GNUNET_CORE_connection_disconnect_from_peer (&msg->host);
+  coreAPI->connection_disconnect_from_peer (&msg->host);
   sendAcknowledgement (client, GNUNET_OK);
 }
 
 static void
 doDisconnect (const GNUNET_PeerIdentity * id, void *unused)
 {
-  coreAPI->GNUNET_CORE_connection_disconnect_from_peer (id);
+  coreAPI->connection_disconnect_from_peer (id);
 }
 
 /**
@@ -157,7 +157,7 @@
       reply->header.header.type = htons (GNUNET_CS_PROTO_TESTBED_REPLY);
       reply->header.msgType = htonl (TESTBED_hello_RESPONSE);
       memcpy (&reply->helo, helo, ntohs (helo->header.size));
-      coreAPI->GNUNET_CORE_cs_send_to_client (client, &reply->header.header);
+      coreAPI->cs_send_to_client (client, &reply->header.header);
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
                      "%s: returning from GNUNET_CORE_cs_send_to_client\n",
@@ -811,8 +811,7 @@
                 = htons (run + sizeof (TESTBED_OUTPUT_REPLY_MESSAGE));
               memcpy (&((TESTBED_OUTPUT_REPLY_MESSAGE_GENERIC *) msg)->
                       data[0], &pi->output[pos], run);
-              coreAPI->GNUNET_CORE_cs_send_to_client (client,
-                                                      &msg->header.header);
+              coreAPI->cs_send_to_client (client, &msg->header.header);
               pos += run;
             }
           GNUNET_free (msg);
@@ -1403,7 +1402,7 @@
     if ((handlers[i].msgId != i) && (handlers[i].handler != &tb_undefined))
       GNUNET_GE_ASSERT (ectx, 0);
   GNUNET_GE_ASSERT (ectx, handlers[TESTBED_MAX_MSG].handler == NULL);
-  identity = capi->GNUNET_CORE_request_service ("identity");
+  identity = capi->request_service ("identity");
   if (identity == NULL)
     return GNUNET_SYSERR;
 
@@ -1467,8 +1466,8 @@
   coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_TESTBED_REQUEST,
                                     (GNUNET_ClientRequestHandler) &
                                     csHandleTestbedRequest);
-  coreAPI->GNUNET_CORE_cs_exit_handler_unregister (&testbedClientExitHandler);
-  coreAPI->GNUNET_CORE_release_service (identity);
+  coreAPI->cs_exit_handler_unregister (&testbedClientExitHandler);
+  coreAPI->release_service (identity);
   identity = NULL;
   coreAPI = NULL;
 }

Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/topology_default/topology.c 2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -136,7 +136,7 @@
 
   if (0 == memcmp (coreAPI->myIdentity, id, sizeof (GNUNET_PeerIdentity)))
     return GNUNET_OK;
-  if (coreAPI->GNUNET_CORE_connection_compute_index_of_peer (id) != im->index)
+  if (coreAPI->connection_compute_index_of_peer (id) != im->index)
     return GNUNET_OK;
   if (GNUNET_OK == coreAPI->queryPeerStatus (id, NULL, NULL))
     return GNUNET_OK;
@@ -164,7 +164,7 @@
 
   if (0 == memcmp (coreAPI->myIdentity, id, sizeof (GNUNET_PeerIdentity)))
     return GNUNET_OK;
-  if (coreAPI->GNUNET_CORE_connection_compute_index_of_peer (id) != im->index)
+  if (coreAPI->connection_compute_index_of_peer (id) != im->index)
     return GNUNET_OK;
   if (GNUNET_OK == coreAPI->queryPeerStatus (id, NULL, NULL))
     return GNUNET_OK;
@@ -225,9 +225,7 @@
   if (0 == memcmp (coreAPI->myIdentity,
                    &indexMatch.match, sizeof (GNUNET_PeerIdentity)))
     return;                     /* should happen really rarely */
-  if (coreAPI->
-      GNUNET_CORE_connection_compute_index_of_peer (&indexMatch.match) !=
-      index)
+  if (coreAPI->connection_compute_index_of_peer (&indexMatch.match) != index)
     {
       GNUNET_GE_BREAK (NULL, 0);        /* should REALLY not happen */
       return;
@@ -276,7 +274,7 @@
                  "Received liveness confirmation from `%s'.\n", &enc);
 #endif
 
-  coreAPI->GNUNET_CORE_connection_mark_session_as_confirmed (hostId);
+  coreAPI->connection_mark_session_as_confirmed (hostId);
   GNUNET_free (hostId);
 }
 
@@ -297,7 +295,7 @@
     return;
   now = GNUNET_get_time ();
   if (GNUNET_SYSERR ==
-      coreAPI->GNUNET_CORE_connection_get_last_activity_of_peer (peer, &act))
+      coreAPI->connection_get_last_activity_of_peer (peer, &act))
     {
       GNUNET_GE_BREAK (coreAPI->ectx, 0);
       return;                   /* this should not happen... */
@@ -350,7 +348,7 @@
                                                          "GNUNETD",
                                                          "DISABLE-AUTOCONNECT",
                                                          GNUNET_NO);
-  slotCount = coreAPI->GNUNET_CORE_connection_get_slot_count ();
+  slotCount = coreAPI->connection_get_slot_count ();
   if ((GNUNET_NO == autoconnect) && (saturation < 1))
     {
       if (saturation * MAX_PEERS_PER_SLOT >= 1)
@@ -362,7 +360,7 @@
           if (GNUNET_random_u32
               (GNUNET_RANDOM_QUALITY_WEAK, LIVE_SCAN_EFFECTIVENESS) != 0)
             continue;
-          if (minint > coreAPI->GNUNET_CORE_connection_is_slot_used (i))
+          if (minint > coreAPI->connection_is_slot_used (i))
             scanForHosts (i);
         }
     }
@@ -593,7 +591,7 @@
                          ("Fewer friends specified than required by minimum 
friend count. Will only connect to friends.\n"));
         }
       if ((minimum_friend_count >
-           coreAPI->GNUNET_CORE_connection_get_slot_count ())
+           coreAPI->connection_get_slot_count ())
           && (friends_only == GNUNET_NO))
         {
           GNUNET_GE_LOG (ectx,
@@ -612,27 +610,27 @@
   static GNUNET_Topology_ServiceAPI api;
 
   coreAPI = capi;
-  identity = capi->GNUNET_CORE_request_service ("identity");
+  identity = capi->request_service ("identity");
   if (identity == NULL)
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
       return NULL;
     }
-  transport = capi->GNUNET_CORE_request_service ("transport");
+  transport = capi->request_service ("transport");
   if (transport == NULL)
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
-      capi->GNUNET_CORE_release_service (identity);
+      capi->release_service (identity);
       identity = NULL;
       return NULL;
     }
-  pingpong = capi->GNUNET_CORE_request_service ("pingpong");
+  pingpong = capi->request_service ("pingpong");
   if (pingpong == NULL)
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
-      capi->GNUNET_CORE_release_service (identity);
+      capi->release_service (identity);
       identity = NULL;
-      capi->GNUNET_CORE_release_service (transport);
+      capi->release_service (transport);
       transport = NULL;
       return NULL;
     }
@@ -640,11 +638,11 @@
                                              &rereadConfiguration, NULL))
     {
       GNUNET_GE_BREAK (coreAPI->ectx, 0);
-      capi->GNUNET_CORE_release_service (identity);
+      capi->release_service (identity);
       identity = NULL;
-      capi->GNUNET_CORE_release_service (transport);
+      capi->release_service (transport);
       transport = NULL;
-      capi->GNUNET_CORE_release_service (pingpong);
+      capi->release_service (pingpong);
       pingpong = NULL;
       return NULL;
     }
@@ -665,11 +663,11 @@
   GNUNET_cron_del_job (coreAPI->cron, &cronCheckLiveness, LIVE_SCAN_FREQUENCY,
                        NULL);
   GNUNET_GC_detach_change_listener (coreAPI->cfg, &rereadConfiguration, NULL);
-  coreAPI->GNUNET_CORE_release_service (identity);
+  coreAPI->release_service (identity);
   identity = NULL;
-  coreAPI->GNUNET_CORE_release_service (transport);
+  coreAPI->release_service (transport);
   transport = NULL;
-  coreAPI->GNUNET_CORE_release_service (pingpong);
+  coreAPI->release_service (pingpong);
   pingpong = NULL;
   coreAPI = NULL;
   GNUNET_array_grow (friends, friendCount, 0);
@@ -696,7 +694,7 @@
 initialize_module_topology_default (GNUNET_CoreAPIForPlugins * capi)
 {
   myCapi = capi;
-  myTopology = capi->GNUNET_CORE_request_service ("topology");
+  myTopology = capi->request_service ("topology");
   GNUNET_GE_ASSERT (capi->ectx, myTopology != NULL);
   GNUNET_GE_ASSERT (capi->ectx,
                     0 == GNUNET_GC_set_configuration_value_string (capi->cfg,
@@ -711,7 +709,7 @@
 void
 done_module_topology_default ()
 {
-  myCapi->GNUNET_CORE_release_service (myTopology);
+  myCapi->release_service (myTopology);
   myCapi = NULL;
   myTopology = NULL;
 }

Modified: GNUnet/src/applications/tracekit/tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/tracekit.c 2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/tracekit/tracekit.c 2007-12-15 04:41:05 UTC (rev 
5900)
@@ -138,9 +138,8 @@
                       peerList[0],
                       &((P2P_tracekit_reply_MESSAGE_GENERIC *) reply)->
                       peerList[0], hostCount * sizeof (GNUNET_PeerIdentity));
-              coreAPI->GNUNET_CORE_cs_send_to_client (clients[idx],
-                                                      &csReply->header,
-                                                      GNUNET_YES);
+              coreAPI->cs_send_to_client (clients[idx],
+                                          &csReply->header, GNUNET_YES);
               GNUNET_free (csReply);
             }
           else
@@ -448,8 +447,7 @@
   if (GNUNET_SYSERR == capi->registerHandler (GNUNET_P2P_PROTO_TRACEKIT_REPLY,
                                               &handlep2pReply))
     ok = GNUNET_SYSERR;
-  if (GNUNET_SYSERR ==
-      capi->GNUNET_CORE_cs_register_exit_handler (&clientExitHandler))
+  if (GNUNET_SYSERR == capi->cs_exit_handler_register (&clientExitHandler))
     ok = GNUNET_SYSERR;
   if (GNUNET_SYSERR ==
       capi->registerClientHandler (GNUNET_CS_PROTO_TRACEKIT_PROBE,
@@ -474,7 +472,7 @@
                               &handlep2pProbe);
   coreAPI->unregisterHandler (GNUNET_P2P_PROTO_TRACEKIT_REPLY,
                               &handlep2pReply);
-  coreAPI->GNUNET_CORE_cs_exit_handler_unregister (&clientExitHandler);
+  coreAPI->cs_exit_handler_unregister (&clientExitHandler);
   coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_TRACEKIT_PROBE,
                                     &csHandle);
   for (i = 0; i < MAXROUTE; i++)

Modified: GNUnet/src/applications/tracekit/tracekittest.c
===================================================================
--- GNUnet/src/applications/tracekit/tracekittest.c     2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/tracekit/tracekittest.c     2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -43,8 +43,8 @@
 
 static int
 report (void *unused,
-       const GNUNET_PeerIdentity * reporter,
-       const GNUNET_PeerIdentity * link)
+        const GNUNET_PeerIdentity * reporter,
+        const GNUNET_PeerIdentity * link)
 {
   GNUNET_EncName src;
   GNUNET_EncName dst;
@@ -122,7 +122,7 @@
       GNUNET_fini (ectx, cfg);
       return 1;
     }
-  ret = 0; /* FIXME: set to 1 here, to 0 in report! */
+  ret = 0;                      /* FIXME: set to 1 here, to 0 in report! */
   cron = GNUNET_cron_create (ectx);
   GNUNET_cron_start (cron);
   GNUNET_cron_add_job (cron, &run_shutdown, GNUNET_CRON_SECONDS * 60,

Modified: GNUnet/src/applications/traffic/traffic.c
===================================================================
--- GNUnet/src/applications/traffic/traffic.c   2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/applications/traffic/traffic.c   2007-12-15 04:41:05 UTC (rev 
5900)
@@ -347,8 +347,7 @@
     return GNUNET_SYSERR;
   msg = (const CS_traffic_request_MESSAGE *) message;
   reply = buildReply (ntohl (msg->timePeriod));
-  ret =
-    coreAPI->GNUNET_CORE_cs_send_to_client (sock, &reply->header, GNUNET_YES);
+  ret = coreAPI->cs_send_to_client (sock, &reply->header, GNUNET_YES);
   GNUNET_free (reply);
   return ret;
 }
@@ -582,18 +581,17 @@
   api.get = &getTrafficStats;
   for (i = 0; i < GNUNET_P2P_PROTO_MAX_USED; i++)
     stat_traffic_transmitted_by_type[i] = 0;
-  coreAPI->
-    GNUNET_CORE_connection_register_send_notification_callback (&trafficSend);
+  coreAPI->connection_register_send_notification_callback (&trafficSend);
   for (i = 0; i < GNUNET_P2P_PROTO_MAX_USED; i++)
     {
       stat_traffic_received_by_type[i] = 0;
       coreAPI->registerHandler (i, &trafficReceive);
-      coreAPI->GNUNET_CORE_plaintext_register_handler (i, &plaintextReceive);
+      coreAPI->plaintext_register_handler (i, &plaintextReceive);
     }
 
   GNUNET_GE_ASSERT (coreAPI->ectx, counters == NULL);
   lock = GNUNET_mutex_create (GNUNET_NO);
-  stats = capi->GNUNET_CORE_request_service ("stats");
+  stats = capi->request_service ("stats");
   return &api;
 }
 
@@ -608,13 +606,10 @@
   for (i = 0; i < GNUNET_P2P_PROTO_MAX_USED; i++)
     {
       coreAPI->unregisterHandler (i, &trafficReceive);
-      coreAPI->GNUNET_CORE_plaintext_unregister_handler (i,
-                                                         &plaintextReceive);
+      coreAPI->plaintext_unregister_handler (i, &plaintextReceive);
     }
-  coreAPI->
-    GNUNET_CORE_connection_unregister_send_notification_callback
-    (&trafficSend);
-  coreAPI->GNUNET_CORE_release_service (stats);
+  coreAPI->connection_unregister_send_notification_callback (&trafficSend);
+  coreAPI->release_service (stats);
   stats = NULL;
   for (i = 0; i < max_message_type; i++)
     GNUNET_free_non_null (counters[i]);
@@ -637,7 +632,7 @@
 {
   GNUNET_GE_ASSERT (capi->ectx, myCoreAPI == NULL);
   myCoreAPI = capi;
-  myApi = capi->GNUNET_CORE_request_service ("traffic");
+  myApi = capi->request_service ("traffic");
   if (myApi == NULL)
     {
       GNUNET_GE_BREAK (capi->ectx, 0);
@@ -668,7 +663,7 @@
                     myCoreAPI->
                     unregisterClientHandler (GNUNET_CS_PROTO_TRAFFIC_QUERY,
                                              &trafficQueryHandler));
-  myCoreAPI->GNUNET_CORE_release_service (myApi);
+  myCoreAPI->release_service (myApi);
   myApi = NULL;
   myCoreAPI = NULL;
 }

Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c       2007-12-15 01:09:56 UTC 
(rev 5899)
+++ GNUnet/src/applications/transport/transport.c       2007-12-15 04:41:05 UTC 
(rev 5900)
@@ -723,7 +723,7 @@
   hello_live *= 60;
 
   GNUNET_GE_ASSERT (ectx, sizeof (GNUNET_MessageHello) == 600);
-  identity = capi->GNUNET_CORE_request_service ("identity");
+  identity = capi->request_service ("identity");
   if (identity == NULL)
     {
       GNUNET_GE_BREAK (ectx, 0);
@@ -737,10 +737,10 @@
   ctapi.load_monitor = coreAPI->load_monitor;
   ctapi.cron = coreAPI->cron;
   ctapi.receive = NULL;         /* initialized LATER! */
-  ctapi.GNUNET_CORE_request_service = coreAPI->GNUNET_CORE_request_service;
-  ctapi.GNUNET_CORE_release_service = coreAPI->GNUNET_CORE_release_service;
-  ctapi.GNUNET_CORE_connection_assert_tsession_unused =
-    coreAPI->GNUNET_CORE_connection_assert_tsession_unused;
+  ctapi.request_service = coreAPI->request_service;
+  ctapi.release_service = coreAPI->release_service;
+  ctapi.connection_assert_tsession_unused =
+    coreAPI->connection_assert_tsession_unused;
 
   GNUNET_array_grow (tapis, tapis_count,
                      GNUNET_TRANSPORT_PROTOCOL_NUMBER_UDP + 1);
@@ -878,7 +878,7 @@
   tapis_lock = NULL;
   GNUNET_array_grow (tapis, tapis_count, 0);
 
-  coreAPI->GNUNET_CORE_release_service (identity);
+  coreAPI->release_service (identity);
   identity = NULL;
   coreAPI = NULL;
   return GNUNET_OK;

Modified: GNUnet/src/applications/vpn/vpn.c
===================================================================
--- GNUnet/src/applications/vpn/vpn.c   2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/applications/vpn/vpn.c   2007-12-15 04:41:05 UTC (rev 5900)
@@ -241,14 +241,13 @@
   b->size = htons (sizeof (GNUNET_MessageHeader) + strlen ((char *) (b + 1)));
   if (c != NULL)
     {
-      coreAPI->GNUNET_CORE_cs_send_to_client (c, b, GNUNET_YES);
+      coreAPI->cs_send_to_client (c, b, GNUNET_YES);
     }
   else
     {
       for (r = 0; r < clients_entries; r++)
         {
-          coreAPI->GNUNET_CORE_cs_send_to_client (*(clients_store + r), b,
-                                                  GNUNET_YES);
+          coreAPI->cs_send_to_client (*(clients_store + r), b, GNUNET_YES);
         }
     }
   GNUNET_free (b);
@@ -1750,8 +1749,7 @@
   if (GNUNET_SYSERR ==
       capi->registerHandler (GNUNET_P2P_PROTO_HANG_UP, &handlep2pMSG))
     return GNUNET_SYSERR;
-  if (GNUNET_SYSERR ==
-      capi->GNUNET_CORE_cs_register_exit_handler (&clientExitHandler))
+  if (GNUNET_SYSERR == capi->cs_exit_handler_register (&clientExitHandler))
     return GNUNET_SYSERR;
   if (GNUNET_SYSERR ==
       capi->registerClientHandler (GNUNET_CS_PROTO_VPN_MSG, &csHandle))
@@ -1787,8 +1785,8 @@
       capi->registerClientHandler (GNUNET_CS_PROTO_VPN_REPLY, &csHandle))
     return GNUNET_SYSERR;
 
-  identity = coreAPI->GNUNET_CORE_request_service ("identity");
-  session = coreAPI->GNUNET_CORE_request_service ("session");
+  identity = coreAPI->request_service ("identity");
+  session = coreAPI->request_service ("session");
 
   GNUNET_GE_ASSERT (ectx, identity != NULL);
   GNUNET_GE_ASSERT (ectx, session != NULL);
@@ -1847,7 +1845,7 @@
   coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_VPN_ADD, &csHandle);
   coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_VPN_TRUST, &csHandle);
   coreAPI->unregisterClientHandler (GNUNET_CS_PROTO_VPN_REPLY, &csHandle);
-  coreAPI->GNUNET_CORE_cs_exit_handler_unregister (&clientExitHandler);
+  coreAPI->cs_exit_handler_unregister (&clientExitHandler);
 
   GNUNET_GE_LOG (ectx, GNUNET_GE_INFO | GNUNET_GE_REQUEST | GNUNET_GE_USER,
                  _("RFC4193 Waiting for tun thread to end\n"));
@@ -1867,8 +1865,8 @@
   GNUNET_GE_LOG (ectx, GNUNET_GE_INFO | GNUNET_GE_REQUEST | GNUNET_GE_USER,
                  _("RFC4193 The tun thread has ended\n"));
 
-  coreAPI->GNUNET_CORE_release_service (identity);
-  coreAPI->GNUNET_CORE_release_service (session);
+  coreAPI->release_service (identity);
+  coreAPI->release_service (session);
 
   identity = NULL;
 

Modified: GNUnet/src/include/dht.h
===================================================================
--- GNUnet/src/include/dht.h    2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/include/dht.h    2007-12-15 04:41:05 UTC (rev 5900)
@@ -74,8 +74,6 @@
 
   GNUNET_HashCode key;
 
-  unsigned long long timeout;   /* nbo */
-
 } CS_dht_request_get_MESSAGE;
 
 #if 0                           /* keep Emacsens' auto-indent happy */

Modified: GNUnet/src/include/gnunet_core.h
===================================================================
--- GNUnet/src/include/gnunet_core.h    2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/include/gnunet_core.h    2007-12-15 04:41:05 UTC (rev 5900)
@@ -249,7 +249,7 @@
    * loaded or unloaded inside the module initialization or shutdown
    * code.
    */
-  void *(*GNUNET_CORE_request_service) (const char *name);
+  void *(*request_service) (const char *name);
 
   /**
    * Notification that the given service is no longer required. This
@@ -261,7 +261,7 @@
    *
    * @return GNUNET_OK if service was successfully released, GNUNET_SYSERR on 
error
    */
-  int (*GNUNET_CORE_release_service) (void *service);
+  int (*release_service) (void *service);
 
   /* ****************** P2P data exchange **************** */
 
@@ -277,9 +277,8 @@
    * @param msg the message to transmit, should contain MESSAGE_HEADERs
    * @return GNUNET_OK on success, GNUNET_SYSERR on failure
    */
-  int (*GNUNET_CORE_connection_send_plaintext) (GNUNET_TSession * session,
-                                                const char *msg,
-                                                unsigned int size);
+  int (*connection_send_plaintext) (GNUNET_TSession * session,
+                                    const char *msg, unsigned int size);
 
   /**
    * Send an encrypted message to another node.
@@ -304,14 +303,14 @@
    * @param importance how important is the message?
    * @param maxdelay how long can the message wait?
    */
-  void (*GNUNET_CORE_connection_send_using_callback) (const
-                                                      GNUNET_PeerIdentity *
-                                                      receiver,
-                                                      
GNUNET_BuildMessageCallback
-                                                      callback, void *closure,
-                                                      unsigned short len,
-                                                      unsigned int importance,
-                                                      unsigned int maxdelay);
+  void (*connection_send_using_callback) (const
+                                          GNUNET_PeerIdentity *
+                                          receiver,
+                                          GNUNET_BuildMessageCallback
+                                          callback, void *closure,
+                                          unsigned short len,
+                                          unsigned int importance,
+                                          unsigned int maxdelay);
 
   /**
    * Perform an operation for all connected hosts.
@@ -343,19 +342,19 @@
    *   that buffer (must be a positive number).
    * @return GNUNET_OK if the handler was registered, GNUNET_SYSERR on error
    */
-  int (*GNUNET_CORE_connection_register_send_callback) (const unsigned int
-                                                        minimumPadding,
-                                                        
GNUNET_BufferFillCallback
-                                                        callback);
+  int (*connection_register_send_callback) (const unsigned int
+                                            minimumPadding,
+                                            GNUNET_BufferFillCallback
+                                            callback);
 
   /**
    * Unregister a handler that was registered with 
GNUNET_CORE_connection_register_send_callback.
    * @return GNUNET_OK if the handler was removed, GNUNET_SYSERR on error
    */
-  int (*GNUNET_CORE_connection_unregister_send_callback) (const unsigned int
-                                                          minimumPadding,
-                                                          
GNUNET_BufferFillCallback
-                                                          callback);
+  int (*connection_unregister_send_callback) (const unsigned int
+                                              minimumPadding,
+                                              GNUNET_BufferFillCallback
+                                              callback);
 
   /**
    * Register a handler that is to be called for each
@@ -365,7 +364,7 @@
    *        P2P message part that is transmitted
    * @return GNUNET_OK on success, GNUNET_SYSERR if there is a problem
    */
-  int (*GNUNET_CORE_connection_register_send_notification_callback)
+  int (*connection_register_send_notification_callback)
     (GNUNET_P2PRequestHandler callback);
 
   /**
@@ -376,7 +375,7 @@
    *        P2P message part that is transmitted
    * @return GNUNET_OK on success, GNUNET_SYSERR if there is a problem
    */
-  int (*GNUNET_CORE_connection_unregister_send_notification_callback)
+  int (*connection_unregister_send_notification_callback)
     (GNUNET_P2PRequestHandler callback);
 
 
@@ -417,8 +416,8 @@
    * @return number of handlers registered, 0 for none,
    *        GNUNET_SYSERR for invalid value of handlerType
    */
-  int (*GNUNET_CORE_p2p_test_handler_registered) (unsigned short type,
-                                                  unsigned short handlerType);
+  int (*p2p_test_handler_registered) (unsigned short type,
+                                      unsigned short handlerType);
 
   /**
    * Register a method as a handler for specific message
@@ -429,9 +428,9 @@
    * @return GNUNET_OK on success, GNUNET_SYSERR if there is already a
    *         handler for that type
    */
-  int (*GNUNET_CORE_plaintext_register_handler) (unsigned short type,
-                                                 
GNUNET_P2PPlaintextRequestHandler
-                                                 callback);
+  int (*plaintext_register_handler) (unsigned short type,
+                                     GNUNET_P2PPlaintextRequestHandler
+                                     callback);
 
   /**
    * Unregister a method as a handler for specific message
@@ -443,9 +442,9 @@
    * @return GNUNET_OK on success, GNUNET_SYSERR if there is a different
    *         handler for that type
    */
-  int (*GNUNET_CORE_plaintext_unregister_handler) (unsigned short type,
-                                                   
GNUNET_P2PPlaintextRequestHandler
-                                                   callback);
+  int (*plaintext_unregister_handler) (unsigned short type,
+                                       GNUNET_P2PPlaintextRequestHandler
+                                       callback);
 
   /* ***************** traffic management ******************* */
 
@@ -471,15 +470,14 @@
    * @param forSending GNUNET_NO if it is the key for receiving,
    *                   GNUNET_YES if it is the key for sending
    */
-  void (*GNUNET_CORE_connection_assign_session_key_to_peer) (const
-                                                             
GNUNET_AES_SessionKey
-                                                             * key,
-                                                             const
-                                                             
GNUNET_PeerIdentity
-                                                             * peer,
-                                                             GNUNET_Int32Time
-                                                             age,
-                                                             int forSending);
+  void (*connection_assign_session_key_to_peer) (const
+                                                 GNUNET_AES_SessionKey
+                                                 * key,
+                                                 const
+                                                 GNUNET_PeerIdentity
+                                                 * peer,
+                                                 GNUNET_Int32Time
+                                                 age, int forSending);
 
   /**
    * Obtain the session key used for traffic from or to a given peer.
@@ -492,13 +490,13 @@
    * @return GNUNET_SYSERR if no sessionkey is known to the core,
    *         GNUNET_OK if the sessionkey was set.
    */
-  int (*GNUNET_CORE_connection_get_session_key_of_peer) (const
-                                                         GNUNET_PeerIdentity *
-                                                         peer,
-                                                         GNUNET_AES_SessionKey
-                                                         * key,
-                                                         GNUNET_Int32Time *
-                                                         age, int forSending);
+  int (*connection_get_session_key_of_peer) (const
+                                             GNUNET_PeerIdentity *
+                                             peer,
+                                             GNUNET_AES_SessionKey
+                                             * key,
+                                             GNUNET_Int32Time *
+                                             age, int forSending);
 
   /**
    * We have confirmed that the other peer is communicating with us,
@@ -507,9 +505,8 @@
    * this could happen if in between the core has discarded
    * the session information).
    */
-  void (*GNUNET_CORE_connection_mark_session_as_confirmed) (const
-                                                            GNUNET_PeerIdentity
-                                                            * peer);
+  void (*connection_mark_session_as_confirmed) (const
+                                                GNUNET_PeerIdentity * peer);
 
   /**
    * Increase the preference for traffic from some other peer.
@@ -537,9 +534,7 @@
    *
    * @param peer  the peer to disconnect
    */
-  void (*GNUNET_CORE_connection_disconnect_from_peer) (const
-                                                       GNUNET_PeerIdentity *
-                                                       peer);
+  void (*connection_disconnect_from_peer) (const GNUNET_PeerIdentity * peer);
 
   /* **************** Client-server interaction **************** */
 
@@ -559,7 +554,7 @@
    * on the other hand does NOT confirm delivery since the actual
    * transfer happens asynchronously.
    */
-  GNUNET_SendToClientCallback GNUNET_CORE_cs_send_to_client;
+  GNUNET_SendToClientCallback cs_send_to_client;
 
   /**
    * Register a method as a handler for specific message
@@ -591,8 +586,7 @@
    *   of every client that disconnected.
    * @return GNUNET_OK on success, GNUNET_SYSERR on error
    */
-  int (*GNUNET_CORE_cs_register_exit_handler) (GNUNET_ClientExitHandler
-                                               callback);
+  int (*cs_exit_handler_register) (GNUNET_ClientExitHandler callback);
 
   /**
    * Unregister a handler to call if any client exits.
@@ -600,16 +594,14 @@
    *   of every client that disconnected.
    * @return GNUNET_OK on success, GNUNET_SYSERR on error
    */
-  int (*GNUNET_CORE_cs_exit_handler_unregister) (GNUNET_ClientExitHandler
-                                                 callback);
+  int (*cs_exit_handler_unregister) (GNUNET_ClientExitHandler callback);
 
   /**
    * Terminate the connection with the given client (asynchronous
    * detection of a protocol violation).
    */
-  void (*GNUNET_CORE_cs_terminate_client_connection) (struct
-                                                      GNUNET_ClientHandle *
-                                                      handle);
+  void (*cs_terminate_client_connection) (struct
+                                          GNUNET_ClientHandle * handle);
 
 
   /* ************************ MISC ************************ */
@@ -624,38 +616,37 @@
    * @param session for plaintext messages, the
    *  assumed transport session.  Maybe NULL.
    */
-  void (*GNUNET_CORE_p2p_inject_message) (const GNUNET_PeerIdentity * sender,
-                                          const char *msg,
-                                          unsigned int size,
-                                          int wasEncrypted,
-                                          GNUNET_TSession * session);
+  void (*p2p_inject_message) (const GNUNET_PeerIdentity * sender,
+                              const char *msg,
+                              unsigned int size,
+                              int wasEncrypted, GNUNET_TSession * session);
 
   /**
    * Compute the index (small, positive, pseudo-unique identification
    * number) of a hostId.
    */
-  unsigned int (*GNUNET_CORE_connection_compute_index_of_peer) (const
-                                                                
GNUNET_PeerIdentity
-                                                                * hostId);
+  unsigned int (*connection_compute_index_of_peer) (const
+                                                    GNUNET_PeerIdentity
+                                                    * hostId);
 
   /**
    * The the lock of the connection module. A module that registers
    * callbacks may need this.
    */
-  struct GNUNET_Mutex *(*GNUNET_CORE_connection_get_lock) (void);
+  struct GNUNET_Mutex *(*connection_get_lock) (void);
 
   /**
    * Get the current number of slots in the connection table (as computed
    * from the available bandwidth).
    */
-  int (*GNUNET_CORE_connection_get_slot_count) (void);
+  int (*connection_get_slot_count) (void);
 
   /**
    * Is the given slot used?
    * @return 0 if not, otherwise number of peers in
    * the slot
    */
-  int (*GNUNET_CORE_connection_is_slot_used) (int slot);
+  int (*connection_is_slot_used) (int slot);
 
   /**
    * Get the time of the last encrypted message that was received
@@ -663,11 +654,10 @@
    * @param time updated with the time
    * @return GNUNET_SYSERR if we are not connected to the peer at the moment
    */
-  int (*GNUNET_CORE_connection_get_last_activity_of_peer) (const
-                                                           GNUNET_PeerIdentity
-                                                           * peer,
-                                                           GNUNET_CronTime *
-                                                           time);
+  int (*connection_get_last_activity_of_peer) (const
+                                               GNUNET_PeerIdentity
+                                               * peer,
+                                               GNUNET_CronTime * time);
 
   /* here for binary compatibility (for now) */
 
@@ -682,12 +672,10 @@
                                    GNUNET_GE_KIND kind, const char *value);
 
   struct GNUNET_GE_Context
-    *(*GNUNET_CORE_cs_create_client_log_context) (GNUNET_GE_KIND mask,
-                                                  struct GNUNET_ClientHandle *
-                                                  handle);
+    *(*cs_create_client_log_context) (GNUNET_GE_KIND mask,
+                                      struct GNUNET_ClientHandle * handle);
 
-  int (*GNUNET_CORE_connection_assert_tsession_unused) (GNUNET_TSession *
-                                                        tsession);
+  int (*connection_assert_tsession_unused) (GNUNET_TSession * tsession);
 
 } GNUNET_CoreAPIForPlugins;
 
@@ -759,7 +747,7 @@
    * loaded or unloaded inside the module initialization or shutdown
    * code.
    */
-  void *(*GNUNET_CORE_request_service) (const char *name);
+  void *(*request_service) (const char *name);
 
   /**
    * Notification that the given service is no longer required. This
@@ -771,7 +759,7 @@
    *
    * @return GNUNET_OK if service was successfully released, GNUNET_SYSERR on 
error
    */
-  int (*GNUNET_CORE_release_service) (void *service);
+  int (*release_service) (void *service);
 
 
 } GNUNET_UpdateAPI;

Modified: GNUnet/src/include/gnunet_dht_lib.h
===================================================================
--- GNUnet/src/include/gnunet_dht_lib.h 2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/include/gnunet_dht_lib.h 2007-12-15 04:41:05 UTC (rev 5900)
@@ -68,8 +68,7 @@
 int GNUNET_DHT_put (struct GNUNET_GC_Configuration *cfg,
                     struct GNUNET_GE_Context *ectx,
                     const GNUNET_HashCode * key,
-                    unsigned int type,
-                    const GNUNET_DataContainer * value);
+                    unsigned int type, const GNUNET_DataContainer * value);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {

Modified: GNUnet/src/include/gnunet_dht_service.h
===================================================================
--- GNUnet/src/include/gnunet_dht_service.h     2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/include/gnunet_dht_service.h     2007-12-15 04:41:05 UTC (rev 
5900)
@@ -45,11 +45,6 @@
 struct GNUNET_DHT_GetHandle;
 
 /**
- * DHT operation 'complete' (i.e timed out).
- */
-typedef void (*GNUNET_DHT_OperationCompleteCallback) (void *closure);
-
-/**
  * Functions of the DHT Service API.
  */
 typedef struct
@@ -70,11 +65,8 @@
    */
   struct GNUNET_DHT_GetHandle *(*get_start) (unsigned int type,
                                              const GNUNET_HashCode * key,
-                                             GNUNET_CronTime timeout,
                                              GNUNET_DataProcessor callback,
-                                             void *cls,
-                                             
GNUNET_DHT_OperationCompleteCallback
-                                             callbackComplete, void *closure);
+                                             void *cls);
 
   /**
    * Stop async DHT-get.  Frees associated resources.
@@ -89,8 +81,7 @@
    * @param key the key to store under
    */
   int (*put) (const GNUNET_HashCode * key,
-             unsigned int type,
-             unsigned int size, const char *data);
+              unsigned int type, unsigned int size, const char *data);
 
 } GNUNET_DHT_ServiceAPI;
 

Modified: GNUnet/src/include/gnunet_transport.h
===================================================================
--- GNUnet/src/include/gnunet_transport.h       2007-12-15 01:09:56 UTC (rev 
5899)
+++ GNUnet/src/include/gnunet_transport.h       2007-12-15 04:41:05 UTC (rev 
5900)
@@ -144,7 +144,7 @@
    * loaded or unloaded inside the module initialization or shutdown
    * code.
    */
-  void *(*GNUNET_CORE_request_service) (const char *name);
+  void *(*request_service) (const char *name);
 
   /**
    * Notification that the given service is no longer required. This
@@ -156,10 +156,9 @@
    *
    * @return GNUNET_OK if service was successfully released, GNUNET_SYSERR on 
error
    */
-  int (*GNUNET_CORE_release_service) (void *service);
+  int (*release_service) (void *service);
 
-  int (*GNUNET_CORE_connection_assert_tsession_unused) (GNUNET_TSession *
-                                                        tsession);
+  int (*connection_assert_tsession_unused) (GNUNET_TSession * tsession);
 
 
 } GNUNET_CoreAPIForTransport;

Modified: GNUnet/src/server/core.c
===================================================================
--- GNUnet/src/server/core.c    2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/server/core.c    2007-12-15 04:41:05 UTC (rev 5900)
@@ -532,53 +532,53 @@
   applicationCore.myIdentity = NULL;    /* for now */
   applicationCore.loadApplicationModule = &loadApplicationModule;       /* 
core.c */
   applicationCore.unloadApplicationModule = &unloadApplicationModule;   /* 
core.c */
-  applicationCore.GNUNET_CORE_request_service = &GNUNET_CORE_request_service;  
 /* core.c */
-  applicationCore.GNUNET_CORE_release_service = &GNUNET_CORE_release_service;  
 /* core.c */
+  applicationCore.request_service = &GNUNET_CORE_request_service;       /* 
core.c */
+  applicationCore.release_service = &GNUNET_CORE_release_service;       /* 
core.c */
 
-  applicationCore.GNUNET_CORE_connection_send_plaintext = 
&GNUNET_CORE_connection_send_plaintext;       /* connection.c */
+  applicationCore.connection_send_plaintext = 
&GNUNET_CORE_connection_send_plaintext;   /* connection.c */
   applicationCore.unicast = &GNUNET_CORE_connection_unicast;    /* 
connection.c */
-  applicationCore.GNUNET_CORE_connection_send_using_callback = 
&GNUNET_CORE_connection_send_using_callback;     /* connection.c */
+  applicationCore.connection_send_using_callback = 
&GNUNET_CORE_connection_send_using_callback; /* connection.c */
   applicationCore.forAllConnectedNodes = 
&GNUNET_CORE_connection_iterate_peers; /* connection.c */
-  applicationCore.GNUNET_CORE_connection_register_send_callback = 
&GNUNET_CORE_connection_register_send_callback;       /* connection.c */
-  applicationCore.GNUNET_CORE_connection_unregister_send_callback = 
&GNUNET_CORE_connection_unregister_send_callback;   /* connection.c */
+  applicationCore.connection_register_send_callback = 
&GNUNET_CORE_connection_register_send_callback;   /* connection.c */
+  applicationCore.connection_unregister_send_callback = 
&GNUNET_CORE_connection_unregister_send_callback;       /* connection.c */
 
-  applicationCore.GNUNET_CORE_connection_register_send_notification_callback =
+  applicationCore.connection_register_send_notification_callback =
     &GNUNET_CORE_connection_register_send_notification_callback;
   applicationCore.
-    GNUNET_CORE_connection_unregister_send_notification_callback =
+    connection_unregister_send_notification_callback =
     &GNUNET_CORE_connection_unregister_send_notification_callback;
   applicationCore.registerHandler = &GNUNET_CORE_p2p_register_handler;  /* 
handler.c */
   applicationCore.unregisterHandler = &GNUNET_CORE_p2p_unregister_handler;     
 /* handler.c */
-  applicationCore.GNUNET_CORE_plaintext_register_handler = 
&GNUNET_CORE_plaintext_register_handler;     /* handler.c */
-  applicationCore.GNUNET_CORE_plaintext_unregister_handler = 
&GNUNET_CORE_plaintext_unregister_handler; /* handler.c */
-  applicationCore.GNUNET_CORE_p2p_test_handler_registered = 
&GNUNET_CORE_p2p_test_handler_registered;   /* handler.c */
+  applicationCore.plaintext_register_handler = 
&GNUNET_CORE_plaintext_register_handler; /* handler.c */
+  applicationCore.plaintext_unregister_handler = 
&GNUNET_CORE_plaintext_unregister_handler;     /* handler.c */
+  applicationCore.p2p_test_handler_registered = 
&GNUNET_CORE_p2p_test_handler_registered;       /* handler.c */
 
   applicationCore.offerTSessionFor = 
&GNUNET_CORE_connection_consider_takeover; /* connection.c */
-  applicationCore.GNUNET_CORE_connection_assign_session_key_to_peer = 
&GNUNET_CORE_connection_assign_session_key_to_peer;       /* connection.c */
-  applicationCore.GNUNET_CORE_connection_get_session_key_of_peer = 
&GNUNET_CORE_connection_get_session_key_of_peer;     /* connection.c */
-  applicationCore.GNUNET_CORE_connection_mark_session_as_confirmed = 
&GNUNET_CORE_connection_mark_session_as_confirmed; /* connection.c */
+  applicationCore.connection_assign_session_key_to_peer = 
&GNUNET_CORE_connection_assign_session_key_to_peer;   /* connection.c */
+  applicationCore.connection_get_session_key_of_peer = 
&GNUNET_CORE_connection_get_session_key_of_peer; /* connection.c */
+  applicationCore.connection_mark_session_as_confirmed = 
&GNUNET_CORE_connection_mark_session_as_confirmed;     /* connection.c */
   applicationCore.preferTrafficFrom = 
&GNUNET_CORE_connection_update_traffic_preference_for_peer;       /* 
connection.c */
   applicationCore.queryPeerStatus = 
&GNUNET_CORE_connection_get_bandwidth_assigned_to_peer;     /* connection.c */
-  applicationCore.GNUNET_CORE_connection_disconnect_from_peer = 
&GNUNET_CORE_connection_disconnect_from_peer;   /* connection.c */
+  applicationCore.connection_disconnect_from_peer = 
&GNUNET_CORE_connection_disconnect_from_peer;       /* connection.c */
 
   applicationCore.sendValueToClient = &GNUNET_CORE_cs_send_result_to_client;   
 /* tcpserver.c */
-  applicationCore.GNUNET_CORE_cs_send_to_client = 
&GNUNET_CORE_cs_send_to_client;       /* tcpserver.c */
+  applicationCore.cs_send_to_client = &GNUNET_CORE_cs_send_to_client;   /* 
tcpserver.c */
   applicationCore.registerClientHandler = &GNUNET_CORE_register_handler;       
 /* tcpserver.c */
   applicationCore.unregisterClientHandler = &GNUNET_CORE_unregister_handler;   
 /* tcpserver.c */
-  applicationCore.GNUNET_CORE_cs_register_exit_handler = 
&GNUNET_CORE_cs_register_exit_handler; /* tcpserver.c */
-  applicationCore.GNUNET_CORE_cs_exit_handler_unregister = 
&GNUNET_CORE_cs_exit_handler_unregister;     /* tcpserver.c */
-  applicationCore.GNUNET_CORE_cs_terminate_client_connection = 
&GNUNET_CORE_cs_terminate_client_connection;     /* tcpserver.c */
+  applicationCore.cs_exit_handler_register = 
&GNUNET_CORE_cs_register_exit_handler;     /* tcpserver.c */
+  applicationCore.cs_exit_handler_unregister = 
&GNUNET_CORE_cs_exit_handler_unregister; /* tcpserver.c */
+  applicationCore.cs_terminate_client_connection = 
&GNUNET_CORE_cs_terminate_client_connection; /* tcpserver.c */
 
-  applicationCore.GNUNET_CORE_p2p_inject_message = 
&GNUNET_CORE_p2p_inject_message;     /* handler.c */
-  applicationCore.GNUNET_CORE_connection_compute_index_of_peer = 
&GNUNET_CORE_connection_compute_index_of_peer; /* connection.c */
-  applicationCore.GNUNET_CORE_connection_get_lock = 
&GNUNET_CORE_connection_get_lock;   /* connection.c */
-  applicationCore.GNUNET_CORE_connection_get_slot_count = 
&GNUNET_CORE_connection_get_slot_count;       /* connection.c */
-  applicationCore.GNUNET_CORE_connection_is_slot_used = 
&GNUNET_CORE_connection_is_slot_used;   /* connection.c */
-  applicationCore.GNUNET_CORE_connection_get_last_activity_of_peer = 
&GNUNET_CORE_connection_get_last_activity_of_peer; /* connection.c */
-  applicationCore.GNUNET_CORE_connection_assert_tsession_unused = 
&GNUNET_CORE_connection_assert_tsession_unused;       /* connection.c */
+  applicationCore.p2p_inject_message = &GNUNET_CORE_p2p_inject_message; /* 
handler.c */
+  applicationCore.connection_compute_index_of_peer = 
&GNUNET_CORE_connection_compute_index_of_peer;     /* connection.c */
+  applicationCore.connection_get_lock = &GNUNET_CORE_connection_get_lock;      
 /* connection.c */
+  applicationCore.connection_get_slot_count = 
&GNUNET_CORE_connection_get_slot_count;   /* connection.c */
+  applicationCore.connection_is_slot_used = 
&GNUNET_CORE_connection_is_slot_used;       /* connection.c */
+  applicationCore.connection_get_last_activity_of_peer = 
&GNUNET_CORE_connection_get_last_activity_of_peer;     /* connection.c */
+  applicationCore.connection_assert_tsession_unused = 
&GNUNET_CORE_connection_assert_tsession_unused;   /* connection.c */
 
   applicationCore.sendErrorMessageToClient = 
&GNUNET_CORE_cs_send_error_to_client;      /* tcpserver.c */
-  applicationCore.GNUNET_CORE_cs_create_client_log_context = 
&GNUNET_CORE_cs_create_client_log_context; /* tcpserver.c */
+  applicationCore.cs_create_client_log_context = 
&GNUNET_CORE_cs_create_client_log_context;     /* tcpserver.c */
 
   identity = GNUNET_CORE_request_service ("identity");
   if (identity == NULL)

Modified: GNUnet/src/server/gnunet-update.c
===================================================================
--- GNUnet/src/server/gnunet-update.c   2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/server/gnunet-update.c   2007-12-15 04:41:05 UTC (rev 5900)
@@ -187,8 +187,8 @@
   char *topo;
 
   uapi.updateModule = &updateModule;
-  uapi.GNUNET_CORE_request_service = &GNUNET_CORE_request_service;
-  uapi.GNUNET_CORE_release_service = &GNUNET_CORE_release_service;
+  uapi.request_service = &GNUNET_CORE_request_service;
+  uapi.release_service = &GNUNET_CORE_release_service;
   uapi.ectx = ectx;
   uapi.cfg = cfg;
 

Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c        2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/transports/http.c        2007-12-15 04:41:05 UTC (rev 5900)
@@ -2280,7 +2280,7 @@
                                                "HTTP", "UPNP",
                                                GNUNET_YES) == GNUNET_YES)
     {
-      upnp = coreAPI->GNUNET_CORE_request_service ("upnp");
+      upnp = coreAPI->request_service ("upnp");
 
       if (upnp == NULL)
         {
@@ -2293,7 +2293,7 @@
         }
     }
 
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats != NULL)
     {
       stat_bytesReceived
@@ -2331,12 +2331,12 @@
   GNUNET_GC_detach_change_listener (coreAPI->cfg, &reloadConfiguration, NULL);
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   if (upnp != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (upnp);
+      coreAPI->release_service (upnp);
       stats = NULL;
     }
   GNUNET_free_non_null (filteredNetworks_);

Modified: GNUnet/src/transports/smtp.c
===================================================================
--- GNUnet/src/transports/smtp.c        2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/transports/smtp.c        2007-12-15 04:41:05 UTC (rev 5900)
@@ -824,7 +824,7 @@
                                             "SMTP",
                                             "RATELIMIT",
                                             0, 0, 1024 * 1024, &rate_limit);
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats != NULL)
     {
       stat_bytesReceived
@@ -845,7 +845,7 @@
                               GNUNET_GE_ADMIN | GNUNET_GE_BULK |
                               GNUNET_GE_FATAL, "mkfifo");
       GNUNET_free (pipename);
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
       return NULL;
     }
@@ -891,7 +891,7 @@
   GNUNET_free (smtp_server_name);
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   GNUNET_mutex_destroy (lock);

Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/transports/tcp.c 2007-12-15 04:41:05 UTC (rev 5900)
@@ -574,7 +574,7 @@
   if (GNUNET_GC_get_configuration_value_yesno (cfg, "TCP", "UPNP", GNUNET_YES)
       == GNUNET_YES)
     {
-      upnp = coreAPI->GNUNET_CORE_request_service ("upnp");
+      upnp = coreAPI->request_service ("upnp");
 
       if (upnp == NULL)
         {
@@ -587,7 +587,7 @@
 
         }
     }
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats != NULL)
     {
       stat_bytesReceived
@@ -619,12 +619,12 @@
   GNUNET_GC_detach_change_listener (cfg, &reloadConfiguration, NULL);
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   if (upnp != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (upnp);
+      coreAPI->release_service (upnp);
       upnp = NULL;
     }
   GNUNET_free_non_null (filteredNetworks_);

Modified: GNUnet/src/transports/tcp6.c
===================================================================
--- GNUnet/src/transports/tcp6.c        2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/transports/tcp6.c        2007-12-15 04:41:05 UTC (rev 5900)
@@ -524,7 +524,7 @@
       return NULL;
     }
   coreAPI = core;
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats != NULL)
     {
       stat_bytesReceived
@@ -554,7 +554,7 @@
 donetransport_tcp6 ()
 {
   GNUNET_GC_detach_change_listener (cfg, &reloadConfiguration, NULL);
-  coreAPI->GNUNET_CORE_release_service (stats);
+  coreAPI->release_service (stats);
   stats = NULL;
   GNUNET_free_non_null (filteredNetworks_);
   GNUNET_mutex_destroy (tcplock);

Modified: GNUnet/src/transports/tcp_helper.c
===================================================================
--- GNUnet/src/transports/tcp_helper.c  2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/transports/tcp_helper.c  2007-12-15 04:41:05 UTC (rev 5900)
@@ -146,8 +146,7 @@
   GNUNET_GE_ASSERT (ectx,
                     GNUNET_OK ==
                     coreAPI->
-                    GNUNET_CORE_connection_assert_tsession_unused
-                    (tcpsession->tsession));
+                    connection_assert_tsession_unused (tcpsession->tsession));
   GNUNET_mutex_lock (tcplock);
   GNUNET_free (tcpsession->tsession);
   GNUNET_free (tcpsession);

Modified: GNUnet/src/transports/udp.c
===================================================================
--- GNUnet/src/transports/udp.c 2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/transports/udp.c 2007-12-15 04:41:05 UTC (rev 5900)
@@ -545,7 +545,7 @@
   if (GNUNET_GC_get_configuration_value_yesno (cfg, "UDP", "UPNP", GNUNET_YES)
       == GNUNET_YES)
     {
-      upnp = coreAPI->GNUNET_CORE_request_service ("upnp");
+      upnp = coreAPI->request_service ("upnp");
 
       if (upnp == NULL)
         GNUNET_GE_LOG (ectx,
@@ -553,7 +553,7 @@
                        "The UPnP service could not be loaded. To disable UPnP, 
set the "
                        "configuration option \"UPNP\" in section \"UDP\" to 
\"NO\"\n");
     }
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats != NULL)
     {
       stat_bytesReceived
@@ -588,12 +588,12 @@
 {
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   if (upnp != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (upnp);
+      coreAPI->release_service (upnp);
       upnp = NULL;
     }
   GNUNET_mutex_destroy (configLock);

Modified: GNUnet/src/transports/udp6.c
===================================================================
--- GNUnet/src/transports/udp6.c        2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/src/transports/udp6.c        2007-12-15 04:41:05 UTC (rev 5900)
@@ -493,7 +493,7 @@
                    GNUNET_GE_ERROR | GNUNET_GE_USER | GNUNET_GE_IMMEDIATE,
                    _("MTU %llu for `%s' is probably too low!\n"), mtu,
                    "UDP6");
-  stats = coreAPI->GNUNET_CORE_request_service ("stats");
+  stats = coreAPI->request_service ("stats");
   if (stats != NULL)
     {
       stat_bytesReceived
@@ -526,7 +526,7 @@
 {
   if (stats != NULL)
     {
-      coreAPI->GNUNET_CORE_release_service (stats);
+      coreAPI->release_service (stats);
       stats = NULL;
     }
   GNUNET_mutex_destroy (configLock);

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2007-12-15 01:09:56 UTC (rev 5899)
+++ GNUnet/todo 2007-12-15 04:41:05 UTC (rev 5900)
@@ -12,7 +12,9 @@
     - Vista?
 - Testcases:
   * more XFS/DHT
-  * tracekit
+  * tracekit:
+    - actual testcase (beyond just printing)
+    - make it actually work...
   * RPC
 
 0.8.0 [2'08] (aka "advanced features"):





reply via email to

[Prev in Thread] Current Thread [Next in Thread]