706c8c2b49fcbd941c9da43c1b8a950c0c33f5ba galt Mon Feb 10 23:54:13 2014 -0800 now converting hgsid and hguid to strings. when the hgsid cart var or hguid cookie is not found it returns NULL instead of 0. diff --git src/hg/hgTables/great.c src/hg/hgTables/great.c index 274005e..4092964 100644 --- src/hg/hgTables/great.c +++ src/hg/hgTables/great.c @@ -168,37 +168,35 @@ struct dyString *greatRequest; greatRequest = dyStringCreate( "", dyStringContents(requestURL), database, dyStringContents(requestName)); hPrintf("GREAT is processing BED data from \"%s\"...please wait.\n", dyStringContents(requestName)); hWrites(dyStringContents(greatRequest)); freeDyString(&greatRequest); freeDyString(&requestName); freeDyString(&requestURL); } void doGetGreatOutput(void (*dispatch)()) { -char hgsid[64]; struct tempName tn; int saveStdout; FILE *f; -safef(hgsid, sizeof(hgsid), "%u", cartSessionId(cart)); -trashDirFile(&tn, "great", hgsid, ".bed"); +trashDirFile(&tn, "great", cartSessionId(cart), ".bed"); f = fopen(tn.forCgi, "w"); /* We want to capture hgTables stdout output to a trash file * which will later be fetched by Great via URL. */ /* Workaround because stdout stream is not assignable on some operating systems */ fflush(stdout); saveStdout = dup(STDOUT_FILENO); dup2(fileno(f),STDOUT_FILENO); /* closes STDOUT before setting it again */ fclose(f); dispatch(); /* this writes to stdout */ /* restore stdout */ fflush(stdout); dup2(saveStdout ,STDOUT_FILENO); /* closes STDOUT before setting it back to saved descriptor */