[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1137 - in GNUnet/src/applications/fs: fsui tools
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1137 - in GNUnet/src/applications/fs: fsui tools |
Date: |
Wed, 29 Jun 2005 07:52:06 -0700 (PDT) |
Author: grothoff
Date: 2005-06-29 07:52:01 -0700 (Wed, 29 Jun 2005)
New Revision: 1137
Modified:
GNUnet/src/applications/fs/fsui/check.conf
GNUnet/src/applications/fs/fsui/downloadtest.c
GNUnet/src/applications/fs/fsui/search.c
GNUnet/src/applications/fs/tools/gnunet-search.c
Log:
check return value
Modified: GNUnet/src/applications/fs/fsui/check.conf
===================================================================
--- GNUnet/src/applications/fs/fsui/check.conf 2005-06-29 14:42:45 UTC (rev
1136)
+++ GNUnet/src/applications/fs/fsui/check.conf 2005-06-29 14:52:01 UTC (rev
1137)
@@ -5,7 +5,7 @@
GNUNETD_HOME = /tmp/gnunet-check-fsui
# VALGRIND = 300
HELOEXPIRES = 60
-LOGLEVEL = NOTHING
+LOGLEVEL = EVERYTHING
LOGFILE = $GNUNETD_HOME/logs
KEEPLOG = 0
PIDFILE = $GNUNETD_HOME/gnunetd.pid
Modified: GNUnet/src/applications/fs/fsui/downloadtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/downloadtest.c 2005-06-29 14:42:45 UTC
(rev 1136)
+++ GNUnet/src/applications/fs/fsui/downloadtest.c 2005-06-29 14:52:01 UTC
(rev 1137)
@@ -46,7 +46,7 @@
NULL));
FREENONNULL(setConfigurationString("GNUNET",
"LOGLEVEL",
- "NOTHING"));
+ "EVERYTHING"));
FREENONNULL(setConfigurationString("GNUNET",
"GNUNETD-CONFIG",
"check.conf"));
@@ -119,7 +119,7 @@
int main(int argc, char * argv[]){
pid_t daemon;
int ok;
- struct ECRS_URI * uri;
+ struct ECRS_URI * uri = NULL;
char * fn = NULL;
char * keywords[] = {
"down_foo",
@@ -129,7 +129,7 @@
char keyword[40];
int prog;
struct ECRS_MetaData * meta;
- struct ECRS_URI * kuri;
+ struct ECRS_URI * kuri = NULL;
if (OK != initUtil(argc,
argv,
@@ -169,6 +169,7 @@
meta,
kuri));
ECRS_freeUri(kuri);
+ kuri = NULL;
ECRS_freeMetaData(meta);
prog = 0;
while (lastEvent != FSUI_upload_complete) {
@@ -204,13 +205,20 @@
}
}
FSUI_stopSearch(ctx,
- uri);
+ uri);
CHECK(OK == FSUI_unindex(ctx, fn));
/* END OF TEST CODE */
FAILURE:
- if (ctx != NULL)
+ if (ctx != NULL) {
+ FSUI_stopSearch(ctx,
+ uri);
FSUI_stop(ctx);
+ }
+ if (uri != NULL)
+ ECRS_freeUri(uri);
+ if (kuri != NULL)
+ ECRS_freeUri(kuri);
if (fn != NULL) {
UNLINK(fn);
FREE(fn);
Modified: GNUnet/src/applications/fs/fsui/search.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search.c 2005-06-29 14:42:45 UTC (rev
1136)
+++ GNUnet/src/applications/fs/fsui/search.c 2005-06-29 14:52:01 UTC (rev
1137)
@@ -160,6 +160,9 @@
while (pos != NULL) {
if (ECRS_equalsUri(uri,
pos->uri)) {
+ LOG(LOG_ERROR,
+ _("This search is already pending!\n"));
+ BREAK();
MUTEX_UNLOCK(&ctx->lock);
return SYSERR;
}
Modified: GNUnet/src/applications/fs/tools/gnunet-search.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-search.c 2005-06-29 14:42:45 UTC
(rev 1136)
+++ GNUnet/src/applications/fs/tools/gnunet-search.c 2005-06-29 14:52:01 UTC
(rev 1137)
@@ -262,13 +262,17 @@
ECRS_freeUri(uri);
return SYSERR;
}
- FSUI_startSearch(ctx,
- getConfigurationInt("FS",
- "ANONYMITY-RECEIVE"),
- uri);
- wait_for_shutdown();
- FSUI_stopSearch(ctx,
- uri);
+ if (OK !=
+ FSUI_startSearch(ctx,
+ getConfigurationInt("FS",
+ "ANONYMITY-RECEIVE"),
+ uri)) {
+ printf(_("Starting search failed. Consult logs.\n"));
+ } else {
+ wait_for_shutdown();
+ FSUI_stopSearch(ctx,
+ uri);
+ }
ECRS_freeUri(uri);
FSUI_stop(ctx);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1137 - in GNUnet/src/applications/fs: fsui tools,
grothoff <=