public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: Mel Hatzis <hatzis@juniper.net>
To: Hans-Albert@ha-schneider.de
Cc: help-gnats@gnu.org
Subject: Re: use of GNATSDB
Date: Tue, 30 Apr 2002 22:18:00 -0000	[thread overview]
Message-ID: <3CCF4E09.70005@juniper.net> (raw)
In-Reply-To: <15528.10405.211358.551224@habakuk.home.ha-schneider.de>

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 <hatzis@juniper.net> 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

  parent reply	other threads:[~2002-05-01  5:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-27 19:24 Mel Hatzis
     [not found] ` <15525.34645.542865.70528@habakuk.home.ha-schneider.de>
     [not found]   ` <3CA6046B.1060004@juniper.net>
     [not found]     ` <15528.10405.211358.551224@habakuk.home.ha-schneider.de>
2002-04-30 22:18       ` Mel Hatzis [this message]
2002-05-17  5:06 ` Lars Henriksen
2002-05-17  5:24   ` Lars Henriksen
2002-05-17  5:30     ` Lars Henriksen
2002-05-17 11:09       ` Mel Hatzis
2002-05-17 11:33         ` Lars Henriksen
2002-05-17 10:33   ` Dirk Bergstrom
2002-05-17 11:15     ` Lars Henriksen
2002-05-17 11:21       ` Dirk Bergstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CCF4E09.70005@juniper.net \
    --to=hatzis@juniper.net \
    --cc=Hans-Albert@ha-schneider.de \
    --cc=help-gnats@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).