gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3397 - in GNUnet/src: applications/fs/fsui applications/fs


From: durner
Subject: [GNUnet-SVN] r3397 - in GNUnet/src: applications/fs/fsui applications/fs/tools applications/stats applications/tbench applications/template applications/tracekit server setup
Date: Tue, 12 Sep 2006 14:15:57 -0700 (PDT)

Author: durner
Date: 2006-09-12 14:15:40 -0700 (Tue, 12 Sep 2006)
New Revision: 3397

Modified:
   GNUnet/src/applications/fs/fsui/fsui-loader.c
   GNUnet/src/applications/fs/tools/gnunet-directory.c
   GNUnet/src/applications/fs/tools/gnunet-download.c
   GNUnet/src/applications/fs/tools/gnunet-insert.c
   GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
   GNUnet/src/applications/fs/tools/gnunet-search.c
   GNUnet/src/applications/fs/tools/gnunet-unindex.c
   GNUnet/src/applications/stats/gnunet-stats.c
   GNUnet/src/applications/tbench/gnunet-tbench.c
   GNUnet/src/applications/template/gnunet-template.c
   GNUnet/src/applications/tracekit/gnunet-tracekit.c
   GNUnet/src/server/gnunet-peer-info.c
   GNUnet/src/server/gnunet-transport-check.c
   GNUnet/src/server/gnunet-update.c
   GNUnet/src/server/gnunetd.c
   GNUnet/src/setup/gnunet-setup.c
Log:
os_init()

Modified: GNUnet/src/applications/fs/fsui/fsui-loader.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui-loader.c       2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/fs/fsui/fsui-loader.c       2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -64,11 +64,13 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   if (argc != 2) {
     fprintf(stderr,
            "Call with name of FSUI resource file!\n");
+    os_done();
     return -1;
   }
   ctx = FSUI_start(ectx,
@@ -83,5 +85,6 @@
   else 
     fprintf(stderr,
            "FSUI_start failed!\n");  
+  os_done();
   return (ctx == NULL);
 }

Modified: GNUnet/src/applications/fs/tools/gnunet-directory.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-directory.c 2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/fs/tools/gnunet-directory.c 2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -164,6 +164,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   i = gnunet_parse_options("gnunet-directory [OPTIONS] [FILENAMES]",
@@ -175,6 +176,7 @@
   if (i == SYSERR) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (do_list)
@@ -195,7 +197,7 @@
 
   GC_free(cfg);
   GE_free_context(ectx);
- 
+  os_done();
 
   return 0;
 }

Modified: GNUnet/src/applications/fs/tools/gnunet-download.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-download.c  2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/fs/tools/gnunet-download.c  2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -155,6 +155,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   i = gnunet_parse_options("gnunet-download [OPTIONS] [KEYWORDS]",
@@ -166,6 +167,7 @@
   if (i == SYSERR) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
 
@@ -176,6 +178,7 @@
             "You must specify a GNUnet file URI\n"));
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;
   }
   GC_get_configuration_value_number(cfg,
@@ -196,6 +199,7 @@
           argv[i]);
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;
   }
 
@@ -250,6 +254,7 @@
   ECRS_freeUri(uri);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   if (dl == NULL)
     return 1;
   return 0;

Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c    2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c    2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -309,6 +309,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   i = gnunet_parse_options("gnunet-insert [OPTIONS] FILENAME",
@@ -318,15 +319,13 @@
                           (unsigned int) argc,
                           argv);
   if (i == SYSERR) {
-    GC_free(cfg);
-    GE_free_context(ectx);
-    return -1;  
+    errorCode = -1;
+    goto quit;  
   }
   if (i != argc - 1) {
     printf(_("You must specify one and only one filename for insertion.\n"));
-    GC_free(cfg);
-    GE_free_context(ectx);
-    return -1;
+    errorCode = -1;
+    goto quit;
   }
   filename = argv[i];
 
@@ -355,10 +354,9 @@
     EXTRACTOR_freeKeywords(list);
     EXTRACTOR_removeAll(l);
     ECRS_freeMetaData(meta);
- 
-    GC_free(cfg);
-    GE_free_context(ectx);
-    return 0;
+
+    errorCode = 0;
+    goto quit; 
   }
 
   
@@ -377,7 +375,8 @@
                                       NULL)) {
       printf(_("Could not access namespace `%s' (does not exist?).\n"),
             pseudonym);
-      return -1;
+      errorCode = -1;
+      goto quit;
     }
     if (creation_time != NULL) {
       struct tm t;
@@ -398,7 +397,8 @@
               "%Y-%m-%d"
 #endif
               );
-       return -1;
+  errorCode = -1;
+       goto quit;
       }
     }
   } else { /* ordinary insertion checks */
@@ -406,27 +406,32 @@
       fprintf(stderr,
              _("Option `%s' makes no sense without option `%s'.\n"),
              "-N", "-P");
-      return -1;
+      errorCode = -1;
+      goto quit;
     }
     if (NULL != prev_id) {
       fprintf(stderr, _("Option `%s' makes no sense without option `%s'.\n"),
              "-u", "-P");
-      return -1;
+      errorCode = -1;
+      goto quit;
     }
     if (NULL != this_id) {
       fprintf(stderr, _("Option `%s' makes no sense without option `%s'.\n"),
              "-t", "-P");
-      return -1;
+      errorCode = -1;
+      goto quit;
     }
     if (0 != interval) {
       fprintf(stderr, _("Option `%s' makes no sense without option `%s'.\n"),
              "-i", "-P");
-      return -1;
+      errorCode = -1;
+      goto quit;
     }
     if (is_sporadic) {
       fprintf(stderr, _("Option `%s' makes no sense without option `%s'.\n"),
              "-S", "-P");
-      return -1;
+      errorCode = -1;
+      goto quit;
     }
   }
 
@@ -466,8 +471,11 @@
 
   ECRS_freeMetaData(meta);
   FSUI_stop(ctx);
+  
+quit:
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   return errorCode;
 }
 

Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -197,6 +197,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   meta = ECRS_createMetaData();
@@ -210,6 +211,7 @@
     GC_free(cfg);
     GE_free_context(ectx);
     ECRS_freeMetaData(meta);
+    os_done();
     return -1;  
   }
   success = 0; /* no errors */
@@ -328,6 +330,7 @@
   ECRS_freeMetaData(meta);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   return success;
 }
 

Modified: GNUnet/src/applications/fs/tools/gnunet-search.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-search.c    2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/fs/tools/gnunet-search.c    2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -252,6 +252,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   i = gnunet_parse_options("gnunet-search [OPTIONS] [KEYWORDS]",
@@ -263,6 +264,7 @@
   if (i == SYSERR) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
 
@@ -277,6 +279,7 @@
     printf(_("Error converting arguments to URI!\n"));
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;
   }
 
@@ -298,6 +301,7 @@
   cron_destroy(cron);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   if (ret == OK)
     return 0;
   else

Modified: GNUnet/src/applications/fs/tools/gnunet-unindex.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-unindex.c   2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/fs/tools/gnunet-unindex.c   2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -126,6 +126,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   i = gnunet_parse_options("gnunet-unindex [OPTIONS] FILENAME",
@@ -137,6 +138,7 @@
   if (i == SYSERR) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (i == argc) {
@@ -146,6 +148,7 @@
             "You must specify a filename.\n"));
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;
   }
   GC_get_configuration_value_number(cfg,
@@ -183,6 +186,7 @@
   SEMAPHORE_DESTROY(exitSignal);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   return errorCode;
 }
 

Modified: GNUnet/src/applications/stats/gnunet-stats.c
===================================================================
--- GNUnet/src/applications/stats/gnunet-stats.c        2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/stats/gnunet-stats.c        2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -117,9 +117,9 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
-  os_init(ectx);
   if (-1 == gnunet_parse_options("gnunet-stats",
                                 ectx,
                                 cfg,
@@ -128,6 +128,7 @@
                                 argv)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   sock = client_connection_create(ectx,
@@ -135,6 +136,7 @@
   if (sock == NULL) {
     fprintf(stderr,
            _("Error establishing connection with gnunetd.\n"));
+    os_done();
     return 1;
   }
   res = requestStatistics(ectx,
@@ -157,6 +159,7 @@
   connection_destroy(sock);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
 
   return (res == OK) ? 0 : 1;
 }

Modified: GNUnet/src/applications/tbench/gnunet-tbench.c
===================================================================
--- GNUnet/src/applications/tbench/gnunet-tbench.c      2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/tbench/gnunet-tbench.c      2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -116,9 +116,9 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
-  os_init(ectx);
   if (-1 == gnunet_parse_options("gnunet-tbench",
                                 ectx,
                                 cfg,
@@ -127,6 +127,7 @@
                                 argv)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   sock = client_connection_create(ectx,
@@ -136,6 +137,7 @@
            _("Error establishing connection with gnunetd.\n"));
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return 1;
   }
 
@@ -154,6 +156,7 @@
     connection_destroy(sock);
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return 1;
   }
   if (OK != enc2hash(messageReceiver,
@@ -164,13 +167,17 @@
     connection_destroy(sock);
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return 1;
   }
   FREE(messageReceiver);
 
   if (SYSERR == connection_write(sock,
                                 &msg.header))
+  {
+    os_done();
     return -1;
+  }
 
   buffer = NULL;
   if (OK == connection_read(sock,
@@ -221,6 +228,7 @@
   connection_destroy(sock);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   return 0;
 }
 

Modified: GNUnet/src/applications/template/gnunet-template.c
===================================================================
--- GNUnet/src/applications/template/gnunet-template.c  2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/template/gnunet-template.c  2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -80,9 +80,9 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
-  os_init(ectx);
   if (-1 == gnunet_parse_options("gnunet-template",
                                 ectx,
                                 cfg,
@@ -91,6 +91,7 @@
                                 argv)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
 
@@ -101,6 +102,7 @@
            _("Error establishing connection with gnunetd.\n"));
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return 1;
   }
   messageReceiveThread = PTHREAD_CREATE(&receiveThread,
@@ -121,6 +123,7 @@
   connection_destroy(sock);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   return 0;
 }
 

Modified: GNUnet/src/applications/tracekit/gnunet-tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/gnunet-tracekit.c  2006-09-11 06:27:20 UTC 
(rev 3396)
+++ GNUnet/src/applications/tracekit/gnunet-tracekit.c  2006-09-12 21:15:40 UTC 
(rev 3397)
@@ -300,9 +300,9 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
-  os_init(ectx);
   if (-1 == gnunet_parse_options("gnunet-tracekit",
                                 ectx,
                                 cfg,
@@ -311,6 +311,7 @@
                                 argv)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   sock = client_connection_create(ectx, cfg);
@@ -319,6 +320,7 @@
            _("Error establishing connection with gnunetd.\n"));
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return 1;
   }
 
@@ -372,6 +374,7 @@
   cron_destroy(cron);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   return 0;
 }
 

Modified: GNUnet/src/server/gnunet-peer-info.c
===================================================================
--- GNUnet/src/server/gnunet-peer-info.c        2006-09-11 06:27:20 UTC (rev 
3396)
+++ GNUnet/src/server/gnunet-peer-info.c        2006-09-12 21:15:40 UTC (rev 
3397)
@@ -113,6 +113,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   if (-1 == gnunet_parse_options("gnunet-peer-info",
@@ -123,12 +124,14 @@
                                 argv)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   } 
   if (-1 == GC_parse_configuration(cfg,
                                   cfgFilename)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   GE_ASSERT(ectx,
@@ -150,6 +153,7 @@
   cron_destroy(cron);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   return 0;
 }
 

Modified: GNUnet/src/server/gnunet-transport-check.c
===================================================================
--- GNUnet/src/server/gnunet-transport-check.c  2006-09-11 06:27:20 UTC (rev 
3396)
+++ GNUnet/src/server/gnunet-transport-check.c  2006-09-12 21:15:40 UTC (rev 
3397)
@@ -390,6 +390,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   if (-1 == gnunet_parse_options("gnunetd",
@@ -400,17 +401,20 @@
                                 argv)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (-1 == GC_parse_configuration(cfg,
                                   cfgFilename)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (OK != changeUser(ectx, cfg)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;
   }
 
@@ -538,6 +542,7 @@
   cron_destroy(cron);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
  
   if (res == OK)
     return 0;

Modified: GNUnet/src/server/gnunet-update.c
===================================================================
--- GNUnet/src/server/gnunet-update.c   2006-09-11 06:27:20 UTC (rev 3396)
+++ GNUnet/src/server/gnunet-update.c   2006-09-12 21:15:40 UTC (rev 3397)
@@ -241,6 +241,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
 
@@ -252,17 +253,20 @@
                                 argv)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (-1 == GC_parse_configuration(cfg,
                                   cfgFilename)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (OK != changeUser(ectx, cfg)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;
   }
   if (0 == GC_get_configuration_value_string(cfg,
@@ -277,6 +281,7 @@
   }
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
 
   return 0;
 }

Modified: GNUnet/src/server/gnunetd.c
===================================================================
--- GNUnet/src/server/gnunetd.c 2006-09-11 06:27:20 UTC (rev 3396)
+++ GNUnet/src/server/gnunetd.c 2006-09-12 21:15:40 UTC (rev 3397)
@@ -205,9 +205,9 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
-  os_init(ectx);
   if (-1 == gnunet_parse_options("gnunetd",
                                 ectx,
                                 cfg,
@@ -216,17 +216,20 @@
                                 argv)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (-1 == GC_parse_configuration(cfg,
                                   cfgFilename)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (OK != changeUser(ectx, cfg)) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return 1;
   }
   if (OK != checkUpToDate(ectx,
@@ -237,12 +240,14 @@
           "gnunet-update");
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return 1;
   }  
   ret = gnunet_main(ectx);
   GC_free(cfg);
   os_done();
   GE_free_context(ectx);
+  os_done();
   if (ret != OK)
     return 1;
   return 0;

Modified: GNUnet/src/setup/gnunet-setup.c
===================================================================
--- GNUnet/src/setup/gnunet-setup.c     2006-09-11 06:27:20 UTC (rev 3396)
+++ GNUnet/src/setup/gnunet-setup.c     2006-09-12 21:15:40 UTC (rev 3397)
@@ -133,6 +133,7 @@
                                  GE_USER | GE_ADMIN | GE_DEVELOPER |
                                  GE_IMMEDIATE | GE_BULK);
   GE_setDefaultContext(ectx);
+  os_init(ectx);
   cfg = GC_create_C_impl();
   GE_ASSERT(ectx, cfg != NULL);
   i = gnunet_parse_options(INFO,
@@ -144,12 +145,14 @@
   if (i < 0) {
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return -1;  
   }
   if (i != argc - 1) {
     if (i < argc - 1) {
       fprintf(stderr,
              _("Too many arguments.\n"));
+      os_done();
       return -1;
     }
     GE_LOG(ectx,
@@ -209,6 +212,7 @@
     GC_free(cfg);
     GE_free_context(ectx);
     FREE(cfgFilename);
+    os_done();
     return -1;
   }
 
@@ -229,6 +233,7 @@
        GNS_free_specification(gns);
        GC_free(cfg);
        GE_free_context(ectx);
+  os_done();
        FREE(cfgFilename);
        return -1;
       } else {
@@ -247,10 +252,12 @@
     GNS_free_specification(gns);
     GC_free(cfg);
     GE_free_context(ectx);
+    os_done();
     return 1;
   }
   GNS_free_specification(gns);
   GC_free(cfg);
   GE_free_context(ectx);
+  os_done();
   return 0;
 }





reply via email to

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