91d7992f30d5756c352c83ff563405551dc64e1c braney Tue Aug 16 16:37:01 2011 -0700 various changes concerning the soft-reset button for #4815 diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 563095d..a6f36d4 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -126,31 +126,33 @@ { // give people a chance to clear the error ourCellStart(); printf( "" , hub->hubUrl); ourCellEnd(); } ourPrintCell(hub->shortLabel); if (isEmpty(hub->errorMessage)) ourPrintCell(hub->longLabel); else - printf("ERROR: %s", hub->errorMessage); + printf("ERROR: %s" + "Debug", + hub->errorMessage); ourPrintCell(hub->hubUrl); ourCellStart(); printf( "" , hub->id); ourCellEnd(); } printf("\n"); printf(""); @@ -250,31 +252,47 @@ { printf("
\n"); printf("No Public Track Hubs for this genome assembly
"); } printf("
"); hDisconnectCentral(&conn); } static void doResetHub(struct cart *theCart) { char *url = cartOptionalString(cart, hgHubDataText); if (url != NULL) - hubResetError(url); + { + unsigned id = hubResetError(url); + + /* try opening this again to reset error */ + struct errCatch *errCatch = errCatchNew(); + struct trackHub *tHub; + if (errCatchStart(errCatch)) + tHub = trackHubFromId(theCart, id); + errCatchEnd(errCatch); + if (errCatch->gotError) + hubSetErrorMessage( errCatch->message->string, id); + else + hubSetErrorMessage(NULL, id); + errCatchFree(&errCatch); + + tHub = NULL; + } else errAbort("must specify url in %s\n", hgHubDataText); } static void doClearHub(struct cart *theCart) { char *url = cartOptionalString(cart, hgHubDataText); printf("
clearing hub %s\n",url);
 if (url != NULL)
     hubClearStatus(url);
 else
     errAbort("must specify url in %s\n", hgHubDataText);
 printf("
Completed\n");
 }