c9f42961046e744998bbaf939cfd3e7a37fd117f max Tue Oct 14 02:58:59 2025 -0700 changing how hgcentral connection is treated when an API key is supplied, open a connection and close it right afterwards, to make sure that no sleeping CGIs clog mysql connections, refs #36498 diff --git src/hg/inc/hubSpaceKeys.h src/hg/inc/hubSpaceKeys.h index 770cd598040..75d3ce75840 100644 --- src/hg/inc/hubSpaceKeys.h +++ src/hg/inc/hubSpaceKeys.h @@ -50,20 +50,20 @@ /* Free a list of dynamically allocated hubSpaceKeys's */ void hubSpaceKeysOutput(struct hubSpaceKeys *el, FILE *f, char sep, char lastSep); /* Print out hubSpaceKeys. Separate fields with sep. Follow last field with lastSep. */ #define hubSpaceKeysTabOut(el,f) hubSpaceKeysOutput(el,f,'\t','\n'); /* Print out hubSpaceKeys as a line in a tab-separated file. */ #define hubSpaceKeysCommaOut(el,f) hubSpaceKeysOutput(el,f,',',','); /* Print out hubSpaceKeys as a comma separated list including final comma. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ #define AUTH_TABLE_DEFAULT "apiKeys" -char *userNameForApiKey(char *apiKey); -/* Return userName associated with apiKey else NULL */ +char *userNameForApiKey(struct sqlConnection *conn, char *apiKey); +/* Return userName associated with apiKey else NULL. If conn is NULL, will create a connection and free it. */ #endif /* HUBSPACEKEYS_H */