From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17836 invoked from network); 1 May 2002 05:18:27 -0000 Received: from unknown (HELO fencepost.gnu.org) (199.232.76.164) by sources.redhat.com with SMTP; 1 May 2002 05:18:27 -0000 Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 172mUC-00051I-00; Wed, 01 May 2002 01:17:04 -0400 Received: from natint.juniper.net ([207.17.136.129] helo=merlot.juniper.net) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 172jXa-0004EI-00 for ; Tue, 30 Apr 2002 22:08:22 -0400 Received: from juniper.net (hatzis-bsd.juniper.net [172.17.12.59]) by merlot.juniper.net (8.11.3/8.11.3) with ESMTP id g41289T97215; Tue, 30 Apr 2002 19:08:09 -0700 (PDT) (envelope-from hatzis@juniper.net) Message-ID: <3CCF4E09.70005@juniper.net> From: Mel Hatzis User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.8) Gecko/20020206 X-Accept-Language: en-us MIME-Version: 1.0 To: Hans-Albert@ha-schneider.de CC: help-gnats@gnu.org Subject: Re: use of GNATSDB References: <3CA28C27.6010201@juniper.net> <15525.34645.542865.70528@habakuk.home.ha-schneider.de> <3CA6046B.1060004@juniper.net> <15528.10405.211358.551224@habakuk.home.ha-schneider.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: help-gnats-admin@gnu.org Errors-To: help-gnats-admin@gnu.org X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General discussion about GNU GNATS List-Archive: Date: Tue, 30 Apr 2002 22:18:00 -0000 X-SW-Source: 2002-q2/txt/msg00018.txt.bz2 Looking at the use of the GNATSDB environment variable throughout the code, it seems somewhat ambiguous. On the one hand, it can be set to a database name corresponding to an entry in the databases file, and on the other hand, it can be set to a colon separated tuple defining a 'remote' database, as follows: hostname:portnumber:databasename:username:password I'd like to suggest that two variables be used for these different purposes to cleanly delineate and clearly specify the intended functionality. My proposal is to continue to use GNATSDB as the 'colon separated tuple' and introduce GNATSID to replace the use of GNATSDB in findOrLoadDatabase (in database.c). I've included an earlier email exchange related to the topic below... My apologies if this is not the right forum for such a discussion. -- Mel Hatzis Juniper Networks, Inc. Hans-Albert Schneider wrote: >>>>>>"Mel" == Mel Hatzis writes: >>>>>> > > Mel> I believe I have the latest code...version 1.42 of > Mel> client.c. > > Yes, that's the version I've got, too. > > Mel> The problem occurs around 13 lines from the bottom of > Mel> the scanEnv function... > > Mel> if (*database == NULL) > Mel> { > Mel> *database = xstrdup ("default"); > Mel> } > > Mel> If you look closely, you'll note that even though the > Mel> env. variable is read, it is not used to initialize the > Mel> 'database' variable....and therefore, the lines I've > Mel> pasted above end up setting it to 'default'. > > I see... It is even a bit more complicated: > > If GNATSDB is a colon separated tuple of > hostname:portnumber:databasename:username:password > then "database" gets initialized, but not if it is the name of a > database listed in the "databases" file. > > (The tuple format is described in the manual in "Environment > variables and GNATS tools" in chapter "The GNATS user tools". It > is probably intended for databases that must be accessed across > the net, but are not listed in the "databases" file.) > > Even worse: I do not see how scanEnv deals with a *local* > database at all. > > A workaround seems to be to specify the database name via option > --database or -d. This is passed to client_init_gnats(), then to > scanEnv(), and is left untouched. > > > I don't dare to change the code, because I do not know it good > enough to be sure not to break another place. > > > Hans-Albert > > _______________________________________________ Help-gnats mailing list Help-gnats@gnu.org http://mail.gnu.org/mailman/listinfo/help-gnats