2 Replies Latest reply: Jan 28, 2013 3:17 AM by sjensen RSS

    tpsvrinit arg processing

    user10459637
      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