595650bf9d6bf6a4bf63b3e29a74415e82c1f993 braney Tue Oct 25 18:45:52 2011 -0700 note that a routine consumes one of its arguments. om nom nom. #5754 diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index f7dff40..fc7f697 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -61,30 +61,31 @@ return; struct trackHub *thub = hub->trackHub; if (thub != NULL) { /* List of associated genomes. */ struct trackHubGenome *genomes = thub->genomeList; for(; genomes; genomes = genomes->next) hashStore(hash, genomes->name); } } static void hgHubConnectUnlisted(struct hubConnectStatus *hubList) /* Put up the list of unlisted hubs and other controls for the page. */ +/* NOTE: Destroys hubList */ { // put out the top of our page printf("<div id=\"unlistedHubs\" class=\"hubList\"> " "<table id=\"unlistedHubsTable\"> " "<thead><tr> " "<th colspan=\"5\" id=\"addHubBar\"><label>URL:</label> " "<input name=\"hubText\" id=\"hubUrl\" class=\"hubField\"" "type=\"text\" size=\"65\"> " "<input name=\"hubAddButton\"" "onClick=\"document.addHubForm.elements['hubUrl'].value=hubText.value;" "document.addHubForm.submit();return true;\" " "class=\"hubField\" type=\"button\" value=\"Add Hub\">" "</th> " "</tr> "); @@ -101,30 +102,32 @@ if (isHubUnlisted(hub) ) { addGenomesToHash(hub, assHash); if ((hub->trackHub == NULL) || trackHubHasDatabase(hub->trackHub, database) ) { unlistedHubCount++; slAddHead(&unlistedHubList, hub); } else { otherHubCount++; } } } +hubList = NULL; // hubList no longer valid + struct hashCookie cookie = hashFirst(assHash); struct dyString *dy = newDyString(100); struct hashEl *hel; int numAssemblies = 0; while ((hel = hashNext(&cookie)) != NULL) { dyStringPrintf(dy,"%s,", hel->name); numAssemblies++; } if (numAssemblies) // take off the final ',' dy->string[strlen(dy->string) - 1] = 0; if (unlistedHubCount == 0) { // nothing to see here