gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: PEERSTORE: Actually return error core in


From: gnunet
Subject: [gnunet] branch master updated: PEERSTORE: Actually return error core in API
Date: Sat, 25 Nov 2023 16:03:53 +0100

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 1c0df659e PEERSTORE: Actually return error core in API
1c0df659e is described below

commit 1c0df659e61217f1adf7be8b105a97b181142b1b
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Sat Nov 25 16:02:34 2023 +0100

    PEERSTORE: Actually return error core in API
    
    also fixes meson tests
---
 meson.build                                      | 44 ++++++++++++------------
 src/service/peerstore/gnunet-service-peerstore.c | 23 ++++---------
 2 files changed, 29 insertions(+), 38 deletions(-)

diff --git a/meson.build b/meson.build
index e65e1eebc..9db38740d 100644
--- a/meson.build
+++ b/meson.build
@@ -364,8 +364,8 @@ endif
 # GNUTLS DANE
 if cc.check_header('gnutls/dane.h')
   if cc.has_function('dane_verify_crt_raw',
-                           prefix: '#include <gnutls/dane.h>',
-                           dependencies: gnutls_dep)
+                     prefix: '#include <gnutls/dane.h>',
+                     dependencies: gnutls_dep)
     add_project_arguments('-DHAVE_GNUTLS_DANE', language : 'c')
   endif
 endif
@@ -376,10 +376,10 @@ curl_ssl_check ='''#include <curl/curl.h>
   '''
 
 result = cc.run(curl_ssl_check, name : 'cURL gnutls check',
-                      dependencies: curl_dep)
+                dependencies: curl_dep)
 cdata.set('curl_gnutls', 0)
 if result.returncode() == 0
-cdata.set('curl_gnutls', 1)
+  cdata.set('curl_gnutls', 1)
 endif
 
 if cc.has_function('getloadavg') == false
@@ -411,8 +411,8 @@ if cc.check_header('ifaddrs.h')
 endif
 
 configure_file(#input: 'gnunet_private_config.h.in',
-               output : 'gnunet_private_config.h',
-               configuration : cdata)
+  output : 'gnunet_private_config.h',
+  configuration : cdata)
 configuration_inc = include_directories('.')
 
 pkg = import('pkgconfig')
@@ -424,31 +424,31 @@ subdir('data')
 
 meson.add_dist_script('meson-dist-script')
 
-add_test_setup('default', exclude_suites: ['perf'], is_default: true)
-add_test_setup('full', is_default: false)
+add_test_setup('default', env: ['GNUNET_PREFIX='/get_option('libdir')], 
exclude_suites: ['perf'], is_default: true)
+add_test_setup('full',  env: ['GNUNET_PREFIX='/get_option('libdir')], 
is_default: false)
 
 summary({'host': host_machine.system(),
          'prefix': get_option('prefix'),
          'compiler': cc.get_id(),
-          'libdir': get_option('libdir'),
-          'datadir': get_option('datadir'),
-          'default interface': cdata.get('GNUNET_DEFAULT_INTERFACE'),
-          'PostgreSQL': pq_dep.found(),
-          'curl w/ gnutls': (cdata.get('curl_gnutls') == 1),
-          'ifconfig': ifconfig_bin.found(),
-          'iptables': iptables_bin.found()
-          }, section: 'Detected system')
+         'libdir': get_option('libdir'),
+         'datadir': get_option('datadir'),
+         'default interface': cdata.get('GNUNET_DEFAULT_INTERFACE'),
+         'PostgreSQL': pq_dep.found(),
+         'curl w/ gnutls': (cdata.get('curl_gnutls') == 1),
+         'ifconfig': ifconfig_bin.found(),
+         'iptables': iptables_bin.found()
+        }, section: 'Detected system')
 
 if not gnunet_user
-message('Please make sure NOW to create a user and group \'gnunet\' and 
additionally a group \'gnunetdns\'. Make sure that \'/var/lib/gnunet\' is owned 
(and writable) by user \'gnunet\'')
-message('Each user of GNUnet should be added to the \'gnunet\' group')
-if adduser_bin.found() and not gnunet_user
+  message('Please make sure NOW to create a user and group \'gnunet\' and 
additionally a group \'gnunetdns\'. Make sure that \'/var/lib/gnunet\' is owned 
(and writable) by user \'gnunet\'')
+  message('Each user of GNUnet should be added to the \'gnunet\' group')
+  if adduser_bin.found() and not gnunet_user
     message('''Create the gnunet user and add users to the gnunetdns group, 
run:
-             # addgroup gnunetdns
-             # adduser --system --disabled-login --home /var/lib/gnunet 
gnunet''')
+    # addgroup gnunetdns
+    # adduser --system --disabled-login --home /var/lib/gnunet gnunet''')
     message('''To add users to the gnunet group, run:
              # adduser USERNAME gnunet
              for each of your users, replacing \'USERNAME\' with the 
respective login name.
              Users may have to login again for the changes to take effect.''')
-endif
+  endif
 endif
diff --git a/src/service/peerstore/gnunet-service-peerstore.c 
b/src/service/peerstore/gnunet-service-peerstore.c
index 77523aa2e..90b4e8d88 100644
--- a/src/service/peerstore/gnunet-service-peerstore.c
+++ b/src/service/peerstore/gnunet-service-peerstore.c
@@ -494,22 +494,13 @@ store_record_continuation (void *cls, int success)
   struct PeerstoreResultMessage *msg;
   struct GNUNET_MQ_Envelope *env;
 
-  if (GNUNET_OK == success)
-  {
-
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found a watcher to update.\n");
-    env = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_PEERSTORE_STORE_RESULT);
-    msg->rid = src->rid;
-    msg->result = htonl (success);
-    GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (src->client), env);
-    watch_notifier (src->record);
-    GNUNET_SERVICE_client_continue (src->client);
-  }
-  else
-  {
-    GNUNET_break (0);
-    GNUNET_SERVICE_client_drop (src->record->client);
-  }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Found a watcher to update.\n");
+  env = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_PEERSTORE_STORE_RESULT);
+  msg->rid = src->rid;
+  msg->result = htonl (success);
+  GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (src->client), env);
+  watch_notifier (src->record);
+  GNUNET_SERVICE_client_continue (src->client);
   PEERSTORE_destroy_record (src->record);
   GNUNET_free (src);
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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