[GMime 3 Branch] IMAP build error

Albrecht Dreß <[email protected]> Sat, 23 Nov 2019 13:52:24 +0100
Newsgroups gmane.comp.gnome.apps.balsa
Message-ID <[email protected]>
Hi all,

I tried the GMime3 branch, but failed to compile it due to an error.  The attached patch /seems/ to fix the issue.

However, the code still seems to be broken; I cannot send messages, and all signed messages report a broken signature, even if the master branch reports them as sane…  Looks like a *huge* amount of work to fix everything! 😕️

Cheers,
Albrecht.

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list
fix_imap_compile_error.diff (text/x-patch, 718 B)
diff --git a/libbalsa/imap/imap-handle.c b/libbalsa/imap/imap-handle.c
index 343b8eb17..b51e53f2d 100644
--- a/libbalsa/imap/imap-handle.c
+++ b/libbalsa/imap/imap-handle.c
@@ -3077,7 +3077,15 @@ ir_envelope(NetClientSioBuf *sio, ImapEnvelope *env)
 
   date = imap_get_nstring(sio);
   if(date) {
-    if(env) env->date = g_mime_utils_header_decode_date(date, NULL);
+    if (env != NULL) {
+      GDateTime *header_date;
+
+      header_date = g_mime_utils_header_decode_date(date);
+      if (header_date != NULL) {
+        env->date = (time_t) g_date_time_to_unix(header_date);
+        g_date_time_unref(header_date);
+      }
+    }
     g_free(date);
   }
   if( (c=sio_getc(sio)) != ' ') return IMR_PROTOCOL;
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEcCEPemLFTtyGf4zATKlvDmfn2fgFAl3ZK4gACgkQTKlvDmfn
2fhflQf+NCw+XDKxgqDpOr1GuaFKzKrpgVgw3+3yXlSbv11F1HXvcvrbNTfrXSzF
A156KFqupPDfJZ5uZEVgW5NbS2zooHAbLPXLzvf0dShHxZTJEJ24IiktWjH1SbMl
2FzmlUPMjRHt1gqHseFsr+xgbcdvazzeF2o9pZNI0o4dmPitVpH2f64YqEL9NCnv
N1bLGeLuvcS+HjEX4smxHEpTLFEVAyMYrWtiQOmdecNCjC1DvXSf7yTQkHnXyGDg
ifMsmCgKczRte8TgD5RhzuGgHkIWZVAeRm+zbLPrDKe5qJa0RsyrDz0PEmDRJLan
uMMhSjc3aimL1APDmWkqqPMJ8zUQCQ==
=/rnY
-----END PGP SIGNATURE-----