doxygen
authorChristian Grothoff <christian@grothoff.org>
Fri, 2 Sep 2011 14:44:42 +0000 (14:44 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 2 Sep 2011 14:44:42 +0000 (14:44 +0000)
20 files changed:
src/ats/ats_api.c
src/datastore/plugin_datastore_postgres.c
src/fs/fs.h
src/fs/gnunet-service-fs_pr.c
src/fs/gnunet-service-fs_pr.h
src/include/gnunet_mesh_service_new.h
src/mesh/mesh_api_new.c
src/nat/gnunet-nat-server.c
src/nat/nat.c
src/nse/gnunet-nse-profiler.c
src/peerinfo/peerinfo_api.c
src/testing/testing.c
src/transport/gnunet-service-transport_ats.c
src/transport/gnunet-transport-list-connections.c
src/transport/transport-testing.c
src/transport/transport-testing.h
src/util/common_allocation.c
src/util/connection.c
src/util/resolver_api.c
src/util/scheduler.c

index 42c2f99a4cecfd982a4ab20e54558e67a4a50429..8a5f23247801d2bada54a1f1abf414f5491f3802 100644 (file)
@@ -256,7 +256,7 @@ update_bandwidth_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 /**
  * Calculate an updated bandwidth assignment and notify.
  *
- * @param ats handle
+ * @param atc handle
  * @param change which allocation record changed?
  */
 static void
index 4e44107b604e607991fff62f00ee801be7a6b52e..3c37325daba4d06697a758da03800d2bf3838aa3 100644 (file)
@@ -710,6 +710,8 @@ postgres_plugin_get_key (void *cls, uint64_t offset,
  * the given iterator for each of them.
  *
  * @param cls our "struct Plugin*"
+ * @param offset offset of the result (modulo num-results);
+ *        specific ordering does not matter for the offset
  * @param type entries of which type should be considered?
  *        Use 0 for any type.
  * @param proc function to call on the matching value;
@@ -767,7 +769,6 @@ struct ReplCtx
  * iterator.
  *
  * @param cls closure
- * @param next_cls closure to pass to the "next" function.
  * @param key key for the content
  * @param size number of bytes in data
  * @param data content stored
index 1629af8523e74f44828b103d4a247455b757f973..ed74850b2e47b9c6f4d3f53cf8e994f1be7b2c71 100644 (file)
@@ -871,14 +871,14 @@ GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id);
  * callback.
  *
  * @param pi structure to fill in
- * @param sc overall publishing context
+ * @param pc overall publishing context
  * @param p file information for the file being published
  * @param offset where in the file are we so far
  * @return value returned from callback
  */
 void *
 GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
-                                struct GNUNET_FS_PublishContext *sc,
+                                struct GNUNET_FS_PublishContext *pc,
                                 const struct GNUNET_FS_FileInformation *p,
                                 uint64_t offset);
 
index a1fc60bd9a655d73e4c8eed69090a7644b54abd2..f63c088c06053e959e1c74c404910f148de6cb39 100644 (file)
@@ -401,7 +401,7 @@ GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr)
  * jointly).
  *
  * @param pra a pending request
- * @param pra another pending request
+ * @param prb another pending request
  * @return GNUNET_OK if the requests are compatible
  */
 int
index 03fc047fbc4b08e828e528d44d085d96e46da604..c8ea5b47fae92be84632b7ce6dfbacce6ba42dd9 100644 (file)
@@ -246,7 +246,7 @@ GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr);
  * jointly).
  *
  * @param pra a pending request
- * @param pra another pending request
+ * @param prb another pending request
  * @return GNUNET_OK if the requests are compatible
  */
 int
index 4729ae60d0ae4b6287de4791e4d2406ec38fe1cd..7ca53b07014d9741bb81e74e93e091e6e4e53013 100644 (file)
@@ -135,14 +135,16 @@ typedef uint32_t GNUNET_MESH_ApplicationType;
  * @param atsi performance information for the tunnel
  * @return initial tunnel context for the tunnel (can be NULL -- that's not an error)
  */
-typedef void* (*GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls,
-                                                              struct GNUNET_MESH_Tunnel * tunnel,
-                                                              const struct
-                                                              GNUNET_PeerIdentity *
-                                                              initiator,
-                                                              const struct
-                                                              GNUNET_TRANSPORT_ATS_Information *
-                                                              atsi);
+typedef void *(*GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls,
+                                                               struct
+                                                               GNUNET_MESH_Tunnel
+                                                               * tunnel,
+                                                               const struct
+                                                               GNUNET_PeerIdentity
+                                                               * initiator,
+                                                               const struct
+                                                               GNUNET_TRANSPORT_ATS_Information
+                                                               * atsi);
 
 
 /**
@@ -219,8 +221,7 @@ typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls,
  * @param handler_cls closure for connect/disconnect handlers
  */
 struct GNUNET_MESH_Tunnel *
-GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
-                          void *tunnel_ctx,
+GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h, void *tunnel_ctx,
                            GNUNET_MESH_TunnelConnectHandler connect_handler,
                            GNUNET_MESH_TunnelDisconnectHandler
                            disconnect_handler, void *handler_cls);
index b639df8120ecaa85957fa7a57fe3418c0e372718..a2e05e822e09109499866a91c1a6314b24838b41 100644 (file)
@@ -363,30 +363,30 @@ create_tunnel (struct GNUNET_MESH_Handle *h, MESH_TunnelNumber tid)
 static void
 destroy_tunnel (struct GNUNET_MESH_Handle *h, MESH_TunnelNumber tid)
 {
-    struct GNUNET_MESH_Tunnel *t;
-    struct GNUNET_PeerIdentity pi;
-    unsigned int i;
+  struct GNUNET_MESH_Tunnel *t;
+  struct GNUNET_PeerIdentity pi;
+  unsigned int i;
 
-    t = retrieve_tunnel(h, tid);
-    if (NULL == t)
-    {
-        GNUNET_break (0);
-        return;
-    }
-    GNUNET_CONTAINER_DLL_remove (h->tunnels_head, h->tunnels_tail, t);
-    for (i = 0; i < t->npeers; i++)
-    {
-        GNUNET_PEER_resolve(t->peers[i]->id, &pi);
-        t->disconnect_handler(t->cls, &pi);
-        GNUNET_PEER_change_rc(t->peers[i]->id, -1);
-        GNUNET_free (t->peers[i]);
-    }
-    h->cleaner(h->cls, t, NULL); /* FIXME ctx? */
-    if (0 != t->owner)
-        GNUNET_PEER_change_rc(t->owner, -1);
-    GNUNET_free(t->peers);
-    GNUNET_free(t);
+  t = retrieve_tunnel (h, tid);
+  if (NULL == t)
+  {
+    GNUNET_break (0);
     return;
+  }
+  GNUNET_CONTAINER_DLL_remove (h->tunnels_head, h->tunnels_tail, t);
+  for (i = 0; i < t->npeers; i++)
+  {
+    GNUNET_PEER_resolve (t->peers[i]->id, &pi);
+    t->disconnect_handler (t->cls, &pi);
+    GNUNET_PEER_change_rc (t->peers[i]->id, -1);
+    GNUNET_free (t->peers[i]);
+  }
+  h->cleaner (h->cls, t, NULL); /* FIXME ctx? */
+  if (0 != t->owner)
+    GNUNET_PEER_change_rc (t->owner, -1);
+  GNUNET_free (t->peers);
+  GNUNET_free (t);
+  return;
 }
 
 
@@ -600,7 +600,7 @@ process_tunnel_create (struct GNUNET_MESH_Handle *h,
   t->cls = h->cls;
   t->mesh = h;
   t->tid = tid;
-  GNUNET_CONTAINER_DLL_insert(h->tunnels_head, h->tunnels_tail, t);
+  GNUNET_CONTAINER_DLL_insert (h->tunnels_head, h->tunnels_tail, t);
   return;
 }
 
@@ -615,17 +615,17 @@ static void
 process_tunnel_destroy (struct GNUNET_MESH_Handle *h,
                         const struct GNUNET_MESH_TunnelMessage *msg)
 {
-    struct GNUNET_MESH_Tunnel *t;
-    MESH_TunnelNumber tid;
-
-    tid = ntohl (msg->tunnel_id);
-    t = retrieve_tunnel(h, tid);
-    
-    t->cls = h->cls;
-    t->mesh = h;
-    t->tid = tid;
-    GNUNET_CONTAINER_DLL_insert(h->tunnels_head, h->tunnels_tail, t);
-    return;
+  struct GNUNET_MESH_Tunnel *t;
+  MESH_TunnelNumber tid;
+
+  tid = ntohl (msg->tunnel_id);
+  t = retrieve_tunnel (h, tid);
+
+  t->cls = h->cls;
+  t->mesh = h;
+  t->tid = tid;
+  GNUNET_CONTAINER_DLL_insert (h->tunnels_head, h->tunnels_tail, t);
+  return;
 }
 
 
@@ -1101,21 +1101,21 @@ GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
  * @param tun tunnel handle
  */
 void
-GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *t)
+GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun)
 {
   struct GNUNET_MESH_Handle *h;
   struct GNUNET_MESH_TunnelMessage msg;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "mesh: Destroying tunnel\n");
-  h = t->mesh;
+  h = tun->mesh;
 
-  if (0 != t->owner)
-    GNUNET_PEER_change_rc (t->owner, -1);
+  if (0 != tun->owner)
+    GNUNET_PEER_change_rc (tun->owner, -1);
 
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY);
   msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
-  msg.tunnel_id = htonl (t->tid);
-  GNUNET_free (t);
+  msg.tunnel_id = htonl (tun->tid);
+  GNUNET_free (tun);
   send_packet (h, &msg.header);
 }
 
index 5e2390f352cd12295962aa75ef74c872a84c5ebd..bb637235de484fd1df00dbe1137f29b4a6125eb1 100644 (file)
@@ -94,7 +94,7 @@ struct TcpContext
  * Task called by the scheduler once we can do the TCP send
  * (or once we failed to connect...).
  *
- * @param ctx the 'struct TcpContext'
+ * @param cls the 'struct TcpContext'
  * @param tc scheduler context
  */
 static void
@@ -123,7 +123,7 @@ tcp_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  * Try to send 'data' to the
  * IP 'dst_ipv4' at port 'dport' via TCP.
  *
- * @param dst_ivp4 target IP
+ * @param dst_ipv4 target IP
  * @param dport target port
  * @param data data to send
  */
@@ -170,7 +170,7 @@ try_send_tcp (uint32_t dst_ipv4, uint16_t dport, uint16_t data)
  * Try to send 'data' to the
  * IP 'dst_ipv4' at port 'dport' via UDP.
  *
- * @param dst_ivp4 target IP
+ * @param dst_ipv4 target IP
  * @param dport target port
  * @param data data to send
  */
@@ -238,7 +238,7 @@ test (void *cls, struct GNUNET_SERVER_Client *client,
 /**
  * Task run during shutdown.
  *
- * @param ctx unused
+ * @param cls unused
  * @param tc scheduler context
  */
 static void
index 891613feadcdad6e560d13e73d3594838586067c..9258384964cc902d73b24b8b7b36147dba643428 100644 (file)
@@ -369,7 +369,7 @@ start_gnunet_nat_server (struct GNUNET_NAT_Handle *h);
  * Remove all addresses from the list of 'local' addresses
  * that originated from the given source.
  *
- * @param plugin the plugin
+ * @param h handle to NAT
  * @param src source that identifies addresses to remove
  */
 static void
@@ -398,7 +398,7 @@ remove_from_address_list_by_source (struct GNUNET_NAT_Handle *h,
  * Add the given address to the list of 'local' addresses, thereby
  * making it a 'legal' address for this peer to have.
  *
- * @param plugin the plugin
+ * @param h handle to NAT
  * @param src where did the local address originate from?
  * @param arg the address, some 'struct sockaddr'
  * @param arg_size number of bytes in arg
@@ -432,7 +432,7 @@ add_to_address_list_as_is (struct GNUNET_NAT_Handle *h,
  * port number in the process to the advertised port and possibly
  * also to zero (if we have the gnunet-helper-nat-server).
  *
- * @param plugin the plugin
+ * @param h handle to NAT
  * @param src where did the local address originate from?
  * @param arg the address, some 'struct sockaddr'
  * @param arg_size number of bytes in arg
@@ -483,10 +483,10 @@ add_to_address_list (struct GNUNET_NAT_Handle *h, enum LocalAddressSource src,
  * Add the given IP address to the list of 'local' addresses, thereby
  * making it a 'legal' address for this peer to have.
  *
- * @param plugin the plugin
+ * @param h handle to NAT
  * @param src where did the local address originate from?
- * @param arg the address, some 'struct in_addr' or 'struct in6_addr'
- * @param arg_size number of bytes in arg
+ * @param addr the address, some 'struct in_addr' or 'struct in6_addr'
+ * @param addrlen number of bytes in addr
  */
 static void
 add_ip_to_address_list (struct GNUNET_NAT_Handle *h,
@@ -1035,8 +1035,8 @@ add_from_bind (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  * @param adv_port advertised port (port we are either bound to or that our OS
  *                 locally performs redirection from to our bound port).
  * @param num_addrs number of addresses in 'addrs'
- * @param addr the local address packets should be redirected to
- * @param addrlen actual lenght of the address
+ * @param addrs the local addresses packets should be redirected to
+ * @param addrlens actual lengths of the addresses
  * @param address_callback function to call everytime the public IP address changes
  * @param reversal_callback function to call if someone wants connection reversal from us
  * @param callback_cls closure for callbacks
index 4879c591666f6222d1dbd8b07d151ee397e13c62..0df6ddf7d623b76d42b77825ba5a19bd164d71f2 100644 (file)
@@ -18,7 +18,7 @@
      Boston, MA 02111-1307, USA.
 */
 /**
- * @file nse/nse-profiler.c
+ * @file nse/gnunet-nse-profiler.c
  *
  * @brief Profiling driver for the network size estimation service.
  *        Generally, the profiler starts a given number of peers,
index 345375819641230bebf1e534ff5c60b64a7148ac..28828f3a3f1be3680f59dfcbfc86538c6895eca9 100644 (file)
@@ -204,7 +204,7 @@ reconnect (struct GNUNET_PEERINFO_Handle *h);
  * Task scheduled to re-try connecting to the peerinfo service.
  *
  * @param cls the 'struct GNUNET_PEERINFO_Handle'
- * @param ts scheduler context
+ * @param tc scheduler context
  */
 static void
 reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
index 5eaa0a12b09a43b38411acc1712fc29b3a23fdcb..ecd6140a6cdd8b1500be066dd75c14e72c9bd803 100644 (file)
@@ -1546,8 +1546,6 @@ GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d,
  * @param timeout how long to wait for process for shutdown to complete
  * @param cb function called once the daemon was stopped
  * @param cb_cls closure for cb
- * @param delete_files GNUNET_YES to remove files, GNUNET_NO
- *        to leave them
  * @param allow_restart GNUNET_YES to restart peer later (using this API)
  *        GNUNET_NO to kill off and clean up for good
  */
index 87aa34bf4fd7945aebe54a51671b8b4e77ea04d3..220fe522b58ecf9b7ae21f60b5adf1dab6d5cd70 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file transport/transport_ats.c
+ * @file transport/gnunet-service-transport_ats.c
  * @brief automatic transport selection
  * @author Matthias Wachs
  *
index d31d2febba53dba739244d15342290ea0afd4acb..0542a5cd9f9150eab51c70668c4558fa54d713ba 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file core/gnunet-transport-list-connections.c
+ * @file transport/gnunet-transport-list-connections.c
  *
  * @brief Print all known address information about other peers.
  *
index e604c59610f61256a10d212b93650b4f4f7c0547..21856c8f268ba3157ef1c62aa807f5bdda1669e0 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file transport_testing.c
+ * @file transport-testing.c
  * @brief testing lib for transport service
  *
  * @author Matthias Wachs
index 80eae363010e91d76cdfe34aeaaa1086ba6b08b0..a5c1b529acf826aea5e8943fbd6bbffabc6f36f0 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file transport_testing.h
+ * @file transport-testing.h
  * @brief testing lib for transport service
  *
  * @author Matthias Wachs
index 71aa15added83f280af0809f04cce0760740d942..ad74727bc89d1aab4c05aa54c460778db9822542 100644 (file)
@@ -222,7 +222,7 @@ GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber)
  * Dup partially a string (same semantics as strndup).
  *
  * @param str the string to dup
- * @param len the lenght of the string to dup
+ * @param len the length of the string to dup
  * @param filename where in the code was the call to GNUNET_strndup
  * @param linenumber where in the code was the call to GNUNET_strndup
  * @return strndup(str,len)
index 8639d241613fd30dc80419d13e9b8d5487acf6af..2c32923c2ff2d2b4c33db6a08c734adc232e8649 100644 (file)
@@ -1685,28 +1685,28 @@ GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle *sock,
 void
 GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
                                                 GNUNET_CONNECTION_TransmitHandle
-                                                *h)
+                                                *th)
 {
-  GNUNET_assert (h->notify_ready != NULL);
-  if (0 != (h->sh->ccs & COCO_TRANSMIT_READY))
+  GNUNET_assert (th->notify_ready != NULL);
+  if (0 != (th->sh->ccs & COCO_TRANSMIT_READY))
   {
 #if DEBUG_CONNECTION
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "notify_transmit_ready_cancel cancels timeout_task (%p)\n", h);
+                "notify_transmit_ready_cancel cancels timeout_task (%p)\n", th);
 #endif
-    GNUNET_SCHEDULER_cancel (h->timeout_task);
-    h->timeout_task = GNUNET_SCHEDULER_NO_TASK;
-    h->sh->ccs -= COCO_TRANSMIT_READY;
+    GNUNET_SCHEDULER_cancel (th->timeout_task);
+    th->timeout_task = GNUNET_SCHEDULER_NO_TASK;
+    th->sh->ccs -= COCO_TRANSMIT_READY;
   }
   else
   {
-    if (h->sh->write_task != GNUNET_SCHEDULER_NO_TASK)
+    if (th->sh->write_task != GNUNET_SCHEDULER_NO_TASK)
     {
-      GNUNET_SCHEDULER_cancel (h->sh->write_task);
-      h->sh->write_task = GNUNET_SCHEDULER_NO_TASK;
+      GNUNET_SCHEDULER_cancel (th->sh->write_task);
+      th->sh->write_task = GNUNET_SCHEDULER_NO_TASK;
     }
   }
-  h->notify_ready = NULL;
+  th->notify_ready = NULL;
 }
 
 /* end of connection.c */
index 69c49d1e853752e1eaa717a4fd41d1ee1783b141..87b7bbd46ae31cd91b61f9c2da4906ae87042031 100644 (file)
@@ -52,7 +52,7 @@ static const char *loopback[] = {
 /**
  * Configuration.
  */
-static const struct GNUNET_CONFIGURATION_Handle *cfg;
+static const struct GNUNET_CONFIGURATION_Handle *resolver_cfg;
 
 /**
  * Our connection to the resolver service, created on-demand, but then
@@ -172,7 +172,7 @@ struct GNUNET_RESOLVER_RequestHandle
  * (or equivalent).
  */
 static void
-check_config (const struct GNUNET_CONFIGURATION_Handle *cfg)
+check_config ()
 {
   char *hostname;
   unsigned int i;
@@ -191,8 +191,8 @@ check_config (const struct GNUNET_CONFIGURATION_Handle *cfg)
   v6.sin6_len = sizeof (v6);
 #endif
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_string (cfg, "resolver", "HOSTNAME",
-                                             &hostname))
+      GNUNET_CONFIGURATION_get_value_string (resolver_cfg, "resolver",
+                                             "HOSTNAME", &hostname))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 _("Must specify `%s' for `%s' in configuration!\n"), "HOSTNAME",
@@ -224,15 +224,15 @@ check_config (const struct GNUNET_CONFIGURATION_Handle *cfg)
 /**
  * Create the connection to the resolver service.
  *
- * @param c configuration to use
+ * @param cfg configuration to use
  */
 void
-GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c)
+GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  GNUNET_assert (NULL != c);
-  check_config (c);
+  GNUNET_assert (NULL != cfg);
   backoff = GNUNET_TIME_UNIT_MILLISECONDS;
-  cfg = c;
+  resolver_cfg = cfg;
+  check_config ();
 }
 
 
@@ -324,8 +324,6 @@ reconnect ();
 
 /**
  * Process pending requests to the resolver.
- *
- * @param h handle to the resolver
  */
 static void
 process_requests ();
@@ -654,7 +652,7 @@ reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 #if DEBUG_RESOLVER
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Trying to connect to DNS service\n");
 #endif
-  client = GNUNET_CLIENT_connect ("resolver", cfg);
+  client = GNUNET_CLIENT_connect ("resolver", resolver_cfg);
   if (NULL == client)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -703,7 +701,7 @@ reconnect ()
               "Will try to connect to DNS service in %llu ms\n",
               (unsigned long long) backoff.rel_value);
 #endif
-  GNUNET_assert (NULL != cfg);
+  GNUNET_assert (NULL != resolver_cfg);
   r_task = GNUNET_SCHEDULER_add_delayed (backoff, &reconnect_task, NULL);
   backoff = GNUNET_TIME_relative_multiply (backoff, 2);
 }
@@ -823,7 +821,7 @@ GNUNET_RESOLVER_hostname_get (const struct sockaddr *sa, socklen_t salen,
 {
   struct GNUNET_RESOLVER_RequestHandle *rh;
 
-  check_config (cfg);
+  check_config ();
   rh = GNUNET_malloc (sizeof (struct GNUNET_RESOLVER_RequestHandle) + salen);
   rh->name_callback = callback;
   rh->cls = cls;
index 0ed48e7936bb4c6d947f14ffa88b7e91d6cbaacb..e2f6700e4b20918917e9963828510bb038c9f4ec 100644 (file)
@@ -260,6 +260,7 @@ static void *scheduler_select_cls;
  * Sets the select function to use in the scheduler (scheduler_select).
  *
  * @param new_select new select function to use
+ * @param new_select_cls closure for 'new_select'
  * @return previously used select function, NULL for default
  */
 void