Hi Albrecht: On 11/30/2019 05:56:16 AM Sat, Albrecht Dreß wrote:
Hi Peter! Am 30.11.19 04:31 schrieb(en) Peter Bloomfield:Testing the autocrypt code with a message to myself, I get an error notification: Autocrypt error: insert user “my-user-id@my-isp” failed: UNIQUE constraint failed: autocrypt.addr The origin of the error is in add_or_update_user_info() at line 252 in libbalsa/autocrypt.c (autocrypt_from_message). If this is really just an attempt to add my info to the database when it's already there, reporting it at the error level seems heavy handed. But perhaps it's a real error--I'm not clear about that.This is really odd, as the code should check if the address is already in the sqlite db, and will perform a SQL update (instead of an insert) in this case… This code didn't change compared with the master branch, btw… I'll look into it. Thanks for the report! Best, Albrecht.
In autocrypt_user_info(), sqlite3_bind_text() returns SQLITE_OK, but sqlite3_step() returns SQLITE_DONE instead of SQLITE_ROW; so the user_info is not allocated, and NULL is returned. That's all I got from gdb… Best, Peter
Attachment:
pgpeZoE64gazE.pgp
Description: PGP signature