aec2e56332612430d809a051d916638b38aee193
max
  Tue Apr 22 05:09:43 2014 -0700
compile-time option to add a password to some bigBed files for gbib-onlytracks, refs #11957

diff --git src/hg/hgTracks/bigBedTrack.c src/hg/hgTracks/bigBedTrack.c
index 848a825..e228186 100644
--- src/hg/hgTracks/bigBedTrack.c
+++ src/hg/hgTracks/bigBedTrack.c
@@ -7,50 +7,56 @@
 #include "linefile.h"
 #include "jksql.h"
 #include "hdb.h"
 #include "bedCart.h"
 #include "hgTracks.h"
 #include "hmmstats.h"
 #include "localmem.h"
 #include "wigCommon.h"
 #include "bbiFile.h"
 #include "obscure.h"
 #include "bigWig.h"
 #include "bigBed.h"
 #include "bigWarn.h"
 #include "errCatch.h"
 #include "trackHub.h"
+#include "net.h"
 
 struct bbiFile *fetchBbiForTrack(struct track *track)
 /* Fetch bbiFile from track, opening it if it is not already open. */
 {
 struct bbiFile *bbi = track->bbiFile;
 if (bbi == NULL)
     {
     char *fileName = NULL;
     if (track->parallelLoading) // do not use mysql during parallel fetch
 	{
 	fileName = cloneString(trackDbSetting(track->tdb, "bigDataUrl"));
 	}
     else
 	{
 	struct sqlConnection *conn = NULL;
 	if (!trackHubDatabase(database))
 	    conn = hAllocConnTrack(database, track->tdb);
 	fileName = bbiNameFromSettingOrTable(track->tdb, conn, track->table);
 	hFreeConn(&conn);
 	}
+    
+    #ifdef USE_GBIB_PWD
+    #include "gbib.c"
+    #endif
+
     bbi = track->bbiFile = bigBedFileOpen(fileName);
     }
 return bbi;
 }
 
 struct bigBedInterval *bigBedSelectRange(struct track *track,
 	char *chrom, int start, int end, struct lm *lm)
 /* Return list of intervals in range. */
 {
 struct bigBedInterval *result = NULL;
 /* protect against temporary network error */
 struct errCatch *errCatch = errCatchNew();
 if (errCatchStart(errCatch))
     {
     struct bbiFile *bbi = fetchBbiForTrack(track);