When there's two concurrent calls of mailstream_ssl_init, one of them will have mailstream_ssl_init_lock() return -1 and the other 0.
The one that returns -1 won't have openssl or gnutls initialized. Therefore subsequent calls of openssl might fail.