This discussion is archived
2 Replies Latest reply: Jan 28, 2013 1:17 AM by sjensen RSS

tpsvrinit arg processing

666593 Newbie
Currently Being Moderated
Hi:

I have a conversational server that needs to process incoming application arguments as part of its startup.

I modified the CLOPT parameter for the server adding the following option:

CLOPT="-A -- -d1"

rebuilt the UBBCONFIG.

Then, I added the following logic to the tpsvrinit function in the server:

tpsvrinit(int argc, char **argv)
{

extern char *optarg;
extern int optind;

int c;

while ((c = getopt(argc, argv, "d:")) != -1) {
switch(c) {

case 'd':
debug = atoi(optarg);
break;
}
}
}

I recompiled the server, rebooted the application however it is not receiving the option.
I dumped out the value returned from the getopt and its get a decimal 63 (?) char.

This a known issue? or am I doing something incorrectly?

TUX version 11gR1 on 32 bit linux.

thx.
WM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points