HP3000-L Archives

October 1997, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bob Walker <[log in to unmask]>
Reply To:
Date:
Wed, 1 Oct 1997 11:31:51 PST8PDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (62 lines)
We  just upgraded to MPE 5.5 Express2(from 5.0) on the weekend  and
now JTMAIL(by Jim Wowchuk) is now behaving strangly.

We run JTMAIL from a job, setting some environment variables first.
Specifically there are character pointers that can get set either
from the command line, if present, or from env variables if not.

Problem lies in when getting settings from env variables.
As each getenv is called, char pointers defined from previous getenvs
are all set to the value of the most recent call to getenv.

eg:
[from job]
:  SETVAR HOST "delphi"
:  SETVAR MAILHOST "mail.capcollege.bc.ca"
:  SETVAR MAILPORT "SMTP"
:  SETVAR MAILUSER "[log in to unmask]"

[from code]
char *gszLocalHost = NULL;   /* the name of the host we're on */
char *gszMailHost = NULL;     /* name of the host running SMTP */
char *gszMailPort = NULL;    /* the TCP service port  */
char *gszUser = NULL;       /* the email address for replies */
.....
gszLocalHost = getenv("HOST");
ShowVars(1);   /* debug - show all gsz.... variables if not NULL */
gszMailHost = getenv("MAILHOST");
ShowVars(2);
gszMailPort = getenv("PORT");
ShowVars(3);
gszUser = getenv("MAILUSER");
ShowVars(4);

[Output]
* 1 * HOST     : delphi

* 2 * MAILHOST : mail.capcollege.bc.ca
* 2 * HOST     : mail.capcollege.bc.ca

* 3 * MAILHOST : SMTP
* 3 * MAILPORT : SMTP
* 3 * HOST     : SMTP

* 4 * MAILHOST : [log in to unmask]
* 4 * MAILUSER : [log in to unmask]
* 4 * MAILPORT : [log in to unmask]
* 4 * HOST     : [log in to unmask]

----
This program worked fine up until upgrade to 5.5.
The workaround we are using  is to supply all info on the command
line.
Any ideas??
Bob.

--=--=--
Bob Walker, Computer Centre  --  [log in to unmask]
Capilano College, North Vancouver, BC, CANADA.
------
'There are over 600 books on the millennium(so far).
110 of them spell it wrong.'

ATOM RSS1 RSS2