[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4814 - in GNUnet/src: applications/fs/fsui applications/tr
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4814 - in GNUnet/src: applications/fs/fsui applications/transport include |
Date: |
Sun, 27 May 2007 17:00:38 -0600 (MDT) |
Author: grothoff
Date: 2007-05-27 17:00:38 -0600 (Sun, 27 May 2007)
New Revision: 4814
Added:
GNUnet/src/include/gnunet_testing_lib.h
Modified:
GNUnet/src/applications/fs/fsui/upload.c
GNUnet/src/applications/transport/transport.c
GNUnet/src/include/Makefile.am
Log:
testing API design and fix to warning levels
Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c 2007-05-27 22:50:17 UTC (rev
4813)
+++ GNUnet/src/applications/fs/fsui/upload.c 2007-05-27 23:00:38 UTC (rev
4814)
@@ -393,7 +393,7 @@
(address != NULL) )
FREE(address);
} else {
- GE_BREAK(ectx, 0);
+ /* may happen if no transports are available... */
loc = ECRS_dupUri(utc->uri);
}
connection_destroy(sock);
Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c 2007-05-27 22:50:17 UTC
(rev 4813)
+++ GNUnet/src/applications/transport/transport.c 2007-05-27 23:00:38 UTC
(rev 4814)
@@ -368,7 +368,7 @@
if ( (ttype >= tapis_count) ||
(tapis[ttype] == NULL) ) {
GE_LOG(ectx,
- GE_WARNING | GE_BULK | GE_USER,
+ GE_DEBUG | GE_BULK | GE_USER,
_("No transport of type %d known.\n"),
ttype);
MUTEX_UNLOCK(tapis_lock);
Modified: GNUnet/src/include/Makefile.am
===================================================================
--- GNUnet/src/include/Makefile.am 2007-05-27 22:50:17 UTC (rev 4813)
+++ GNUnet/src/include/Makefile.am 2007-05-27 23:00:38 UTC (rev 4814)
@@ -41,6 +41,7 @@
gnunet_state_service.h \
gnunet_stats_lib.h \
gnunet_stats_service.h \
+ gnunet_testing_lib.h \
gnunet_topology_service.h \
gnunet_traffic_lib.h \
gnunet_traffic_service.h \
Added: GNUnet/src/include/gnunet_testing_lib.h
===================================================================
--- GNUnet/src/include/gnunet_testing_lib.h (rev 0)
+++ GNUnet/src/include/gnunet_testing_lib.h 2007-05-27 23:00:38 UTC (rev
4814)
@@ -0,0 +1,86 @@
+/*
+ This file is part of GNUnet
+ (C) 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
+ by the Free Software Foundation; either version 2, or (at your
+ option) any later version.
+
+ GNUnet is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNUnet; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file include/gnunet_testing_lib.h
+ * @brief convenience API for writing testcases for GNUnet
+ * @author Christian Grothoff
+ */
+
+#ifndef GNUNET_TESTING_LIB_H
+#define GNUNET_TESTING_LIB_H
+
+#include "gnunet_util.h"
+
+#ifdef __cplusplus
+extern "C" {
+#if 0 /* keep Emacsens' auto-indent happy */
+}
+#endif
+#endif
+
+/**
+ * Starts a gnunet daemon.
+ *
+ * @param port port to listen on for local clients
+ * @param gnunetd_home directory to use for the home directory
+ * @param transports transport services that should be loaded
+ * @param applications application services that should be loaded
+ * @param pid of the process (set)
+ * @param peer identity of the peer (set)
+ * @return OK on success, SYSERR on error
+ */
+int gnunet_testing_start_daemon(unsigned short port,
+ const char * gnunetd_home,
+ const char * transports,
+ const char * applications,
+ pid_t * pid,
+ PeerIdentity * peer);
+
+/**
+ * Establish a connection between two GNUnet daemons
+ * (both must run on this machine).
+ *
+ * @param port1 client port of the first daemon
+ * @param port2 client port of the second daemon
+ * @return OK on success, SYSERR on failure
+ */
+int gnunet_testing_connect_daemons(unsigned short port1,
+ unsigned short port2);
+
+
+/**
+ * Shutdown the GNUnet daemon waiting on the given port
+ * and running under the given pid.
+ *
+ * @return OK on success, SYSERR on failure
+ */
+int gnunet_testing_stop_daemon(unsigned short port,
+ pid_t pid);
+
+
+#if 0 /* keep Emacsens' auto-indent happy */
+{
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Property changes on: GNUnet/src/include/gnunet_testing_lib.h
___________________________________________________________________
Name: svn:eol-style
+ native
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4814 - in GNUnet/src: applications/fs/fsui applications/transport include,
gnunet <=