Commented out the or'd identity.flags / pgp_keypair.flags in the sql code for the get_identity functions; we've never HAD a pgp_keypair flag before, so it never hurt before, but at this point, we're going to introduce them, and I don't want trouble. If fdik wants them or'd, fine, we'll have to change the values in the keyflags to be disjoint from the identity flags so they can coexist, but for now, they are out.

Krista Bennett 2 years ago
parent 99831445b3
commit 594133cfde

1
.gitignore vendored

@ -93,6 +93,7 @@ src/commit_hash.h
venv/
venv2/
cleangit.py
newgit
# ignore generated test data

@ -22,9 +22,12 @@ static const char *sql_trustword =
"and id = ?2 ;";
// FIXME?: problems if we don't have a key for the user - we get nothing
// Also: we've never used pgp_keypair.flags before now, but it seems to me that
// having combination of those flags is a road to ruin. Changing this for now.
static const char *sql_get_identity =
"select identity.main_key_id, username, comm_type, lang,"
" identity.flags | pgp_keypair.flags,"
" identity.flags,"
// " identity.flags | pgp_keypair.flags,"
" is_own, pEp_version_major, pEp_version_minor, enc_format"
" from identity"
" join person on id = identity.user_id"
@ -42,7 +45,8 @@ static const char *sql_get_identity =
static const char *sql_get_identities_by_main_key_id =
"select address, identity.user_id, username, comm_type, lang,"
" identity.flags | pgp_keypair.flags,"
" identity.flags,"
// " identity.flags | pgp_keypair.flags,"
" is_own, pEp_version_major, pEp_version_minor, enc_format"
" from identity"
" join person on id = identity.user_id"
@ -82,7 +86,8 @@ static const char *sql_get_identities_by_address =
static const char *sql_get_identities_by_userid =
"select address, identity.main_key_id, username, comm_type, lang,"
" identity.flags | pgp_keypair.flags,"
" identity.flags,"
// " identity.flags | pgp_keypair.flags,"
" is_own, pEp_version_major, pEp_version_minor, enc_format"
" from identity"
" join person on id = identity.user_id"
@ -385,7 +390,10 @@ static const char *sql_is_own_address =
static const char *sql_own_identities_retrieve =
"select address, identity.main_key_id, identity.user_id, username,"
" lang, identity.flags | pgp_keypair.flags, pEp_version_major, pEp_version_minor"
" lang,"
" identity.flags,"
// " identity.flags | pgp_keypair.flags,"
" pEp_version_major, pEp_version_minor"
" from identity"
" join person on id = identity.user_id"
" left join pgp_keypair on fpr = identity.main_key_id"

@ -741,8 +741,9 @@ typedef enum _identity_flags {
typedef unsigned int identity_flags_t;
// typedef enum _keypair_flags {
// } keypair_flags;
typedef enum _keypair_flags {
PEP_kpf_manually_set = 0x0001;
} keypair_flags;
typedef unsigned int keypair_flags_t;

Loading…
Cancel
Save