static int tds_try_conf_file(const char *path, const char *how, const char *server, TDSCONNECTINFO * connect_info) { int found = 0; FILE *in; if ((in = fopen(path, "r")) != NULL) { tdsdump_log(TDS_DBG_INFO1, "%L Found conf file '%s' %s. Reading section '%s'.\n", path, how, server); found = tds_read_conf_sections(in, server, connect_info); if (found) { tdsdump_log(TDS_DBG_INFO1, "%L ...Success.\n"); } else { tdsdump_log(TDS_DBG_INFO2, "%L ...'%s' not found.\n", server); } fclose(in); } return found; }
static int tds_try_conf_file(const char *path, const char *how, const char *server, TDSLOGIN * login) { int found = 0; FILE *in; if ((in = fopen(path, "r")) == NULL) { tdsdump_log(TDS_DBG_INFO1, "Could not open '%s' (%s).\n", path, how); return found; } tdsdump_log(TDS_DBG_INFO1, "Found conf file '%s' %s.\n", path, how); found = tds_read_conf_sections(in, server, login); if (found) { tdsdump_log(TDS_DBG_INFO1, "Success: [%s] defined in %s.\n", server, path); } else { tdsdump_log(TDS_DBG_INFO2, "[%s] not found.\n", server); } fclose(in); return found; }