[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-sync] branch master updated: ignores
From: |
gnunet |
Subject: |
[taler-sync] branch master updated: ignores |
Date: |
Thu, 14 Nov 2019 19:54:12 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository sync.
The following commit(s) were added to refs/heads/master by this push:
new 29877dd ignores
29877dd is described below
commit 29877ddfcc811c75bd6b11ec91dc2ad235ac77ae
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Nov 14 19:54:10 2019 +0100
ignores
---
.gitignore | 2 ++
src/include/sync_database_plugin.h | 14 +++++++-------
src/include/sync_service.h | 6 +++---
src/syncdb/.gitignore | 4 ++++
src/syncdb/plugin_syncdb_postgres.c | 30 ++++++++++++++----------------
src/syncdb/test_sync_db.c | 6 +++---
6 files changed, 33 insertions(+), 29 deletions(-)
diff --git a/.gitignore b/.gitignore
index 1ecf3bd..dad0ec5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -61,3 +61,5 @@ src/include/Makefile.in
A
A
+sync_config.h
+sync_config.h.in
diff --git a/src/include/sync_database_plugin.h
b/src/include/sync_database_plugin.h
index 36162c6..cdc65e9 100644
--- a/src/include/sync_database_plugin.h
+++ b/src/include/sync_database_plugin.h
@@ -126,8 +126,8 @@ struct SYNC_DatabasePlugin
*/
enum SYNC_DB_QueryStatus
(*store_backup_TR)(void *cls,
- const struct SYNC_AccountPublicKey *account_pub,
- const struct SYNC_AccountSignature *account_sig,
+ const struct SYNC_AccountPublicKeyP *account_pub,
+ const struct SYNC_AccountSignatureP *account_sig,
const struct GNUNET_HashCode *backup_hash,
size_t backup_size,
const void *backup);
@@ -146,9 +146,9 @@ struct SYNC_DatabasePlugin
*/
enum SYNC_DB_QueryStatus
(*update_backup_TR)(void *cls,
- const struct SYNC_AccountPublicKey *account_pub,
+ const struct SYNC_AccountPublicKeyP *account_pub,
const struct GNUNET_HashCode *old_backup_hash,
- const struct SYNC_AccountSignature *account_sig,
+ const struct SYNC_AccountSignatureP *account_sig,
const struct GNUNET_HashCode *backup_hash,
size_t backup_size,
const void *backup);
@@ -165,8 +165,8 @@ struct SYNC_DatabasePlugin
*/
enum SYNC_DB_QueryStatus
(*lookup_backup_TR)(void *cls,
- const struct SYNC_AccountPublicKey *account_pub,
- struct SYNC_AccountSignature *account_sig,
+ const struct SYNC_AccountPublicKeyP *account_pub,
+ struct SYNC_AccountSignatureP *account_sig,
struct GNUNET_HashCode *backup_hash,
size_t *backup_size,
void **backup);
@@ -181,7 +181,7 @@ struct SYNC_DatabasePlugin
*/
enum SYNC_DB_QueryStatus
(*increment_lifetime_TR)(void *cls,
- const struct SYNC_AccountPublicKey *account_pub,
+ const struct SYNC_AccountPublicKeyP *account_pub,
struct GNUNET_TIME_Relative lifetime);
};
diff --git a/src/include/sync_service.h b/src/include/sync_service.h
index d0c79af..e99d0c3 100644
--- a/src/include/sync_service.h
+++ b/src/include/sync_service.h
@@ -29,7 +29,7 @@
/**
* Private key identifying an account.
*/
-struct SYNC_AccountPrivateKey
+struct SYNC_AccountPrivateKeyP
{
/**
* We use EdDSA.
@@ -41,7 +41,7 @@ struct SYNC_AccountPrivateKey
/**
* Public key identifying an account.
*/
-struct SYNC_AccountPublicKey
+struct SYNC_AccountPublicKeyP
{
/**
* We use EdDSA.
@@ -53,7 +53,7 @@ struct SYNC_AccountPublicKey
/**
* Signature made with an account's public key.
*/
-struct SYNC_AccountSignature
+struct SYNC_AccountSignatureP
{
/**
* We use EdDSA.
diff --git a/src/syncdb/.gitignore b/src/syncdb/.gitignore
new file mode 100644
index 0000000..e8e02d8
--- /dev/null
+++ b/src/syncdb/.gitignore
@@ -0,0 +1,4 @@
+test_sync_db-postgres
+.deps
+.libs
+test-suite.log
diff --git a/src/syncdb/plugin_syncdb_postgres.c
b/src/syncdb/plugin_syncdb_postgres.c
index d1c49b5..1d89b5d 100644
--- a/src/syncdb/plugin_syncdb_postgres.c
+++ b/src/syncdb/plugin_syncdb_postgres.c
@@ -249,8 +249,8 @@ postgres_gc (void *cls,
*/
static enum SYNC_DB_QueryStatus
postgres_store_backup (void *cls,
- const struct SYNC_AccountPublicKey *account_pub,
- const struct SYNC_AccountSignature *account_sig,
+ const struct SYNC_AccountPublicKeyP *account_pub,
+ const struct SYNC_AccountSignatureP *account_sig,
const struct GNUNET_HashCode *backup_hash,
size_t backup_size,
const void *backup)
@@ -387,9 +387,9 @@ postgres_store_backup (void *cls,
*/
static enum SYNC_DB_QueryStatus
postgres_update_backup (void *cls,
- const struct SYNC_AccountPublicKey *account_pub,
+ const struct SYNC_AccountPublicKeyP *account_pub,
const struct GNUNET_HashCode *old_backup_hash,
- const struct SYNC_AccountSignature *account_sig,
+ const struct SYNC_AccountSignatureP *account_sig,
const struct GNUNET_HashCode *backup_hash,
size_t backup_size,
const void *backup)
@@ -531,8 +531,8 @@ postgres_update_backup (void *cls,
*/
static enum SYNC_DB_QueryStatus
postgres_lookup_backup (void *cls,
- const struct SYNC_AccountPublicKey *account_pub,
- struct SYNC_AccountSignature *account_sig,
+ const struct SYNC_AccountPublicKeyP *account_pub,
+ struct SYNC_AccountSignatureP *account_sig,
struct GNUNET_HashCode *backup_hash,
size_t *backup_size,
void **backup)
@@ -588,7 +588,7 @@ postgres_lookup_backup (void *cls,
*/
static enum SYNC_DB_QueryStatus
postgres_increment_lifetime (void *cls,
- const struct SYNC_AccountPublicKey *account_pub,
+ const struct SYNC_AccountPublicKeyP *account_pub,
struct GNUNET_TIME_Relative lifetime)
{
struct PostgresClosure *pg = cls;
@@ -753,14 +753,14 @@ libsync_plugin_db_postgres_init (void *cls)
"SELECT"
" expiration_date "
"FROM"
- " account"
+ " accounts "
"WHERE"
" account_pub=$1;",
1),
GNUNET_PQ_make_prepare ("gc",
"DELETE FROM accounts "
"WHERE"
- " expiration_data<$1;",
+ " expiration_date < $1;",
1),
GNUNET_PQ_make_prepare ("backup_insert",
"INSERT INTO backups "
@@ -780,15 +780,13 @@ libsync_plugin_db_postgres_init (void *cls)
" WHERE"
" account_pub=$4"
" AND"
- " backup_hash=$5"
- ") VALUES "
- "($1,$2,$3,$4,$5);",
+ " backup_hash=$5;",
5),
GNUNET_PQ_make_prepare ("backup_select_hash",
"SELECT "
- " backup_hash"
+ " backup_hash "
"FROM"
- " backups"
+ " backups "
"WHERE"
" account_pub=$1;",
1),
@@ -796,9 +794,9 @@ libsync_plugin_db_postgres_init (void *cls)
"SELECT "
" account_sig"
",backup_hash"
- ",data"
+ ",data "
"FROM"
- " backups"
+ " backups "
"WHERE"
" account_pub=$1;",
1),
diff --git a/src/syncdb/test_sync_db.c b/src/syncdb/test_sync_db.c
index 55e5c98..d0b7b61 100644
--- a/src/syncdb/test_sync_db.c
+++ b/src/syncdb/test_sync_db.c
@@ -22,10 +22,9 @@
#include "platform.h"
#include <gnunet/gnunet_util_lib.h>
#include <taler/taler_util.h>
+#include "sync_service.h"
#include "sync_database_plugin.h"
#include "sync_database_lib.h"
-#include "sync_error_codes.h"
-#include <uuid/uuid.h>
#define FAILIF(cond) \
@@ -52,7 +51,7 @@ static struct SYNC_DatabasePlugin *plugin;
/**
* User public key, set to a random value
*/
-static struct SYNC_AccountPubP accountPubP;
+static struct SYNC_AccountPublicKeyP accountPubP;
/**
@@ -85,6 +84,7 @@ run (void *cls)
}
// FIXME: test logic here!
+ result = 0;
GNUNET_break (GNUNET_OK ==
plugin->drop_tables (plugin->cls));
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [taler-sync] branch master updated: ignores,
gnunet <=