Mailing List Archive

CVS suggestion
Hi guys -

Thanks heaps for your work in the CVS regarding the split up of auth/message
databases. Another easy/quick (?) suggestion to make the code more flexible
for ISPs:

In config.h, add lines like:

#define FIELD_USERIDNR "user_idnr"


And in the db files (eg. Dbauthmysql.c), change the lines from:

sprintf(__auth_query_data, DEF_QUERYSIZE, "SELECT user_idnr FROM users
WHERE ...

To lines like:

sprintf(__auth_query_data, DEF_QUERYSIZE, "SELECT " FIELD_USERIDNR "
FROM users WHERE ...
(note the user_idnr replaced by the define)

This may not be valid C but worked alright on my system -- and allows the
developers to use default table columns, but allow other people who may use
"mailboxid" as the user_idnr column in the existing auth databases.

Cheers,
Mark.