X-Git-Url: http://git.hcoop.net/hcoop/debian/courier-authlib.git/blobdiff_plain/8d138742ae268344f406cb75d79aa6bf853f9d87..b0322a8536f3cab76471c98122fe1df75bb7c387:/authpgsqllib.c diff --git a/authpgsqllib.c b/authpgsqllib.c index b66b4f1..924323b 100644 --- a/authpgsqllib.c +++ b/authpgsqllib.c @@ -28,7 +28,6 @@ #define SV_BEGIN_LEN ((sizeof(SV_BEGIN_MARK))-1) #define SV_END_LEN ((sizeof(SV_END_MARK))-1) -static const char rcsid[]="$Id: authpgsqllib.c,v 1.19 2008/12/18 12:08:25 mrsam Exp $"; /* tom@minnesota.com */ struct var_data { @@ -220,6 +219,7 @@ const char *server_opt=0; userid ? userid : "", database); err("%s", PQerrorMessage(pgconn)); + PQfinish(pgconn); pgconn=0; return -1; } @@ -619,7 +619,6 @@ struct authpgsqluserinfo *auth_pgsql_getuserinfo(const char *username, user_table, login_field, username_escaped, \ where_pfix, where_clause, where_sfix - if (do_connect()) return (0); initui(); @@ -995,7 +994,11 @@ void auth_pgsql_enumerate( void(*cb_func)(const char *name, int i,n; - if (do_connect()) return; + if (do_connect()) + { + (*cb_func)(NULL, 0, 0, NULL, NULL, NULL, void_arg); + return; + } initui();