9c28afc6ca0b8e2b4404ab7a894925e8f5fcf62b hiram Thu Mar 21 11:11:54 2019 -0700 begin round of consolidation and simplification refs #18869 diff --git src/hg/hubApi/list.c src/hg/hubApi/list.c index 958811e..acbb12f 100644 --- src/hg/hubApi/list.c +++ src/hg/hubApi/list.c @@ -337,32 +337,31 @@ if (isEmpty(hubUrl)) // missing hubUrl implies UCSC database { trackDbJsonOutput(db, stdout); // only need db for this function return; } if (isEmpty(genome) || isEmpty(hubUrl)) { if (isEmpty(genome)) warn("# must supply genome='someName' the name of a genome in a hub for /list/tracks\n"); if (isEmpty(hubUrl)) apiErrAbort("ERROR: must supply hubUrl='http:...' some URL to a hub for /list/genomes"); } struct trackHub *hub = errCatchTrackHubOpen(hubUrl); if (hub->genomeList) { - struct trackDb *tdbList = NULL; - (void) genomeList(hub, &tdbList, genome); + struct trackDb *tdbList = obtainTdb(hub->genomeList, NULL); slSort(tdbList, trackDbTrackCmp); struct jsonWrite *jw = apiStartOutput(); jsonWriteString(jw, "hubUrl", hubUrl); jsonWriteObjectStart(jw, genome); struct trackDb *el = NULL; for (el = tdbList; el != NULL; el = el->next ) { recursiveTrackList(jw, el); } jsonWriteObjectEnd(jw); jsonWriteObjectEnd(jw); fputs(jw->dy->string,stdout); } } else if (sameWord("chromosomes", words[1]))