In the coming release, I'd very much appreciate if more calls to
auth_connect() were added to parallel calls to db_connect(). Here's a
quick grep of today's CVS to show which files need the added calls:
[EMAIL PROTECTED] dbmail]$ grep auth_connect *
auth.h:int auth_connect();
injector.c: if (db_connect() != 0 || auth_connect() != 0)
smtp-convert.c: if (db_connect() != 0 || auth_connect() != 0)
user.c: if (auth_connect()==-1)
vut2dbmail.c: if (auth_connect() == -1)
[EMAIL PROTECTED] dbmail]$ grep db_connect *
db.h:int db_connect();
dbtest.c: db_connect();
injector.c: if (db_connect() != 0 || auth_connect() != 0)
main.c: if (db_connect() < 0)
Binary file main.o matches
maintenance.c: if (db_connect()==-1)
mini-injector.c: if (db_connect() != 0)
raw-convert.c: if (db_connect() != 0)
serverchild.c: if ( db_connect() != 0)
settings.c: if (db_connect()==-1)
smtp-convert.c: if (db_connect() != 0 || auth_connect() != 0)
user.c: if (db_connect()==-1)
vut2dbmail.c: if (db_connect() == -1)
Also, for the (default) case of auth_connect() === db_connect(), I posted
an #ifndef patch a few weeks ago to take care of that. Like this:
int auth_connect()
{
#ifndef DBMAIL_USE_SAME_CONNECTION
mysql_init(&__auth_conn);
if (mysql_real_connect (&__auth_conn, _auth_host, _auth_user,
_auth_pass, _auth_db, 0, NULL, 0) == NULL)
{
trace(TRACE_ERROR,"auth_connect(): mysql_real_connect failed: %s",
mysql_error(&__auth_conn));
return -1;
}
#endif
return 0;
}
int auth_disconnect()
{
#ifndef DBMAIL_USE_SAME_CONNECTION
mysql_close(&__auth_conn);
#endif
return 0;
}
Thanks!
Aaron