diff options
author | Marvin W <git@larma.de> | 2017-04-18 17:55:20 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2017-04-18 20:20:41 +0200 |
commit | 7e388fb2bc784568734592dcb2e863dfa061bed4 (patch) | |
tree | eb4fb804fd7cf9df02b39d37b61937f355785810 /plugins/omemo/src/database.vala | |
parent | f95b4f4e0949eefaed871c267626e3ff84ce5ca6 (diff) | |
download | dino-7e388fb2bc784568734592dcb2e863dfa061bed4.tar.gz dino-7e388fb2bc784568734592dcb2e863dfa061bed4.zip |
signal-protocol/omemo: fix null-pointer issues
Fixes #44 and #58
Diffstat (limited to 'plugins/omemo/src/database.vala')
-rw-r--r-- | plugins/omemo/src/database.vala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/omemo/src/database.vala b/plugins/omemo/src/database.vala index 8d69ca15..a4a4842b 100644 --- a/plugins/omemo/src/database.vala +++ b/plugins/omemo/src/database.vala @@ -12,8 +12,8 @@ public class Database : Qlite.Database { public Column<int> id = new Column.Integer("id") { primary_key = true, auto_increment = true }; public Column<int> account_id = new Column.Integer("account_id") { unique = true, not_null = true }; public Column<int> device_id = new Column.Integer("device_id") { not_null = true }; - public Column<string> identity_key_private_base64 = new Column.Text("identity_key_private_base64") { not_null = true }; - public Column<string> identity_key_public_base64 = new Column.Text("identity_key_public_base64") { not_null = true }; + public Column<string> identity_key_private_base64 = new Column.NonNullText("identity_key_private_base64"); + public Column<string> identity_key_public_base64 = new Column.NonNullText("identity_key_public_base64"); internal IdentityTable(Database db) { base(db, "identity"); @@ -24,7 +24,7 @@ public class Database : Qlite.Database { public class SignedPreKeyTable : Table { public Column<int> identity_id = new Column.Integer("identity_id") { not_null = true }; public Column<int> signed_pre_key_id = new Column.Integer("signed_pre_key_id") { not_null = true }; - public Column<string> record_base64 = new Column.Text("record_base64") { not_null = true }; + public Column<string> record_base64 = new Column.NonNullText("record_base64"); internal SignedPreKeyTable(Database db) { base(db, "signed_pre_key"); @@ -36,7 +36,7 @@ public class Database : Qlite.Database { public class PreKeyTable : Table { public Column<int> identity_id = new Column.Integer("identity_id") { not_null = true }; public Column<int> pre_key_id = new Column.Integer("pre_key_id") { not_null = true }; - public Column<string> record_base64 = new Column.Text("record_base64") { not_null = true }; + public Column<string> record_base64 = new Column.NonNullText("record_base64"); internal PreKeyTable(Database db) { base(db, "pre_key"); @@ -47,9 +47,9 @@ public class Database : Qlite.Database { public class SessionTable : Table { public Column<int> identity_id = new Column.Integer("identity_id") { not_null = true }; - public Column<string> address_name = new Column.Text("name") { not_null = true }; + public Column<string> address_name = new Column.NonNullText("name"); public Column<int> device_id = new Column.Integer("device_id") { not_null = true }; - public Column<string> record_base64 = new Column.Text("record_base64") { not_null = true }; + public Column<string> record_base64 = new Column.NonNullText("record_base64"); internal SessionTable(Database db) { base(db, "session"); |