Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 31005 invoked from network); 28 Apr 2006 09:29:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Apr 2006 09:29:27 -0000 Received: (qmail 86527 invoked by uid 500); 28 Apr 2006 09:29:26 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 86503 invoked by uid 500); 28 Apr 2006 09:29:26 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 86492 invoked by uid 99); 28 Apr 2006 09:29:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Apr 2006 02:29:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of PRESTONF@uk.ibm.com designates 195.212.29.137 as permitted sender) Received: from [195.212.29.137] (HELO mtagate4.uk.ibm.com) (195.212.29.137) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Apr 2006 02:29:25 -0700 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate4.uk.ibm.com (8.13.6/8.13.6) with ESMTP id k3S9T39V074874 for ; Fri, 28 Apr 2006 09:29:03 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1407.portsmouth.uk.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k3S9ToH6046542 for ; Fri, 28 Apr 2006 10:29:50 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.12.11/8.13.3) with ESMTP id k3S9T3kr016661 for ; Fri, 28 Apr 2006 10:29:03 +0100 Received: from d06ml068.portsmouth.uk.ibm.com (d06ml068.portsmouth.uk.ibm.com [9.149.38.194]) by d06av02.portsmouth.uk.ibm.com (8.12.11/8.12.11) with ESMTP id k3S9T3PY016655 for ; Fri, 28 Apr 2006 10:29:03 +0100 In-Reply-To: To: "Apache AXIS C Developers List" Subject: Re: Stub::SetSecure() question MIME-Version: 1.0 X-Mailer: Lotus Notes Release 7.0 HF144 February 01, 2006 Message-ID: From: Fred Preston Date: Fri, 28 Apr 2006 10:29:52 +0100 X-MIMETrack: Serialize by Router on D06ML068/06/M/IBM(Release 6.53HF247 | January 6, 2005) at 28/04/2006 10:29:52, Serialize complete at 28/04/2006 10:29:52 Content-Type: multipart/alternative; boundary="=_alternative 003419248025715E_=" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multipart message in MIME format. --=_alternative 003419248025715E_= Content-Type: text/plain; charset="US-ASCII" Hi Nadir, This is a bit of code that remained when I was looking at configuring SSL. The code could be updated to the following... m_sArguments[6] = "false"; if( (pszArg = pszArguments) != NULL) { do { if( pszArg == (char *) 1) m_sArguments[iArgIndex] = "true"; else m_sArguments[iArgIndex] = pszArg; iArgIndex++; } while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8); } But there is no real reason for having this code and it could be shortened to;- if( (pszArg = pszArguments) != NULL) { do { m_sArguments[iArgIndex] = pszArg; iArgIndex++; } while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8); } Regards, Fred Preston. Nadir Amra 28/04/2006 06:19 Please respond to "Apache AXIS C Developers List" To "Apache AXIS C Developers List" cc Subject Stub::SetSecure() question There is a line of code that I do not quite understand in Stub::SetSecure. Here is the routine: va_list args; char * pszArg = NULL; va_start( args, pszArguments); if( (pszArg = pszArguments) != NULL) { do { if( pszArg == (char *) 1) m_sArguments[iArgIndex] = "true"; else m_sArguments[iArgIndex] = pszArg; iArgIndex++; } while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8); if( iArgIndex == 6) m_sArguments[iArgIndex] = "false"; } va_end( args); The line I do not understand is if( pszArg == (char *) 1) Can someone please explain how this works? Nadir K. Amra --=_alternative 003419248025715E_= Content-Type: text/html; charset="US-ASCII"
Hi Nadir,
        This is a bit of code that remained when I was looking at configuring SSL.  The code could be updated to the following...

    m_sArguments[6] = "false";

   if( (pszArg = pszArguments) != NULL)
   {
       do
       {
           if( pszArg == (char *) 1)
               m_sArguments[iArgIndex] = "true";
           else
               m_sArguments[iArgIndex] = pszArg;

           iArgIndex++;
       }
       while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8);
   }

        But there is no real reason for having this code and it could be shortened to;-

    if( (pszArg = pszArguments) != NULL)
   {
       do
       {
           m_sArguments[iArgIndex] = pszArg;

           iArgIndex++;
       }
       while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8);
   }

Regards,

Fred Preston.



Nadir Amra <amra@us.ibm.com>

28/04/2006 06:19
Please respond to
"Apache AXIS C Developers List" <axis-c-dev@ws.apache.org>

To
"Apache AXIS C Developers List" <axis-c-dev@ws.apache.org>
cc
Subject
Stub::SetSecure() question





There is a line of code that I do not quite understand in Stub::SetSecure.
Here is the routine:

   va_list args;
   char *  pszArg = NULL;

   va_start( args, pszArguments);

   if( (pszArg = pszArguments) != NULL)
   {
       do
       {
           if( pszArg == (char *) 1)
               m_sArguments[iArgIndex] = "true";
           else
               m_sArguments[iArgIndex] = pszArg;

           iArgIndex++;
       }
       while( (pszArg = va_arg( args, char *)) != NULL && iArgIndex < 8);

       if( iArgIndex == 6)
           m_sArguments[iArgIndex] = "false";
   }

   va_end( args);

The line I do not understand is

           if( pszArg == (char *) 1)

Can someone please explain how this works?

Nadir K. Amra


--=_alternative 003419248025715E_=--