httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/arch/win32 mod_isapi.c
Date Thu, 26 Jul 2001 16:27:42 GMT
wrowe       01/07/26 09:27:42

  Modified:    modules/arch/win32 mod_isapi.c
  Log:
    Flush the off_t compiler emits from mod_isapi
  
  Revision  Changes    Path
  1.46      +27 -26    httpd-2.0/modules/arch/win32/mod_isapi.c
  
  Index: mod_isapi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/win32/mod_isapi.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- mod_isapi.c	2001/07/23 19:33:03	1.45
  +++ mod_isapi.c	2001/07/26 16:27:42	1.46
  @@ -433,7 +433,7 @@
            * TODO: add the httpd.conf option for ReadAheadBuffer.
            */
           if (r->remaining) {
  -            cid->ecb->cbTotalBytes = r->remaining;
  +            cid->ecb->cbTotalBytes = (apr_size_t)r->remaining;
               if (cid->ecb->cbTotalBytes > cid->sconf->ReadAheadBuffer)
                   cid->ecb->cbAvailable = cid->sconf->ReadAheadBuffer;
               else
  @@ -671,8 +671,9 @@
       DWORD read = 0;
       int res;
   
  -    if (r->remaining < (long) *lpdwSize)
  -        *lpdwSize = r->remaining;
  +    if (r->remaining < *lpdwSize) {
  +        *lpdwSize = (apr_size_t)r->remaining;
  +    }
   
       while (read < *lpdwSize &&
              ((res = ap_get_client_block(r, (char*)lpvBuffer + read,
  @@ -684,9 +685,9 @@
       return TRUE;
   }
   
  -static apr_off_t SendResponseHeaderEx(isapi_cid *cid, const char *stat,
  -                                      const char *head, apr_size_t statlen,
  -                                      apr_size_t headlen)
  +static apr_ssize_t SendResponseHeaderEx(isapi_cid *cid, const char *stat,
  +                                        const char *head, apr_size_t statlen,
  +                                        apr_size_t headlen)
   {
       int termarg;
       char *termch;
  @@ -729,7 +730,7 @@
       /* Any data left is sent directly by the caller, all we
        * give back is the size of the headers we consumed
        */
  -    if (termch && (termarg == 1) && headlen > (termch - head)) {
  +    if (termch && (termarg == 1) && head + headlen > termch) {
           return termch - head;
       }
       return 0;
  @@ -779,7 +780,7 @@
       {
           /* Parse them out, or die trying */
           apr_size_t statlen = 0, headlen = 0;
  -        int ate;
  +        apr_ssize_t ate;
           if (lpvBuffer)
               statlen = strlen((char*) lpvBuffer);
           if (lpdwDataType)
  @@ -791,7 +792,7 @@
               SetLastError(TODO_ERROR);
               return FALSE;
           }
  -        else if (ate < headlen) {
  +        else if ((apr_size_t)ate < headlen) {
               apr_bucket_brigade *bb;
               apr_bucket *b;
               bb = apr_brigade_create(cid->r->pool);
  @@ -912,36 +913,36 @@
                * response headers, and without, pHead simply contains text
                * (handled after this case).
                */
  -            apr_off_t ate = SendResponseHeaderEx(cid, tf->pszStatusCode, 
  -                                                 (char*)tf->pHead,
  -                                                 strlen(tf->pszStatusCode), 
  -                                                 (apr_size_t)tf->HeadLength);
  +            apr_ssize_t ate = SendResponseHeaderEx(cid, tf->pszStatusCode, 
  +                                                   (char*)tf->pHead,
  +                                                   strlen(tf->pszStatusCode), 
  +                                                   tf->HeadLength);
               if (ate < 0)
               {
                   apr_brigade_destroy(bb);
                   SetLastError(TODO_ERROR);
                   return FALSE;
               }
  -            if (ate < (apr_size_t)tf->HeadLength)
  +            if ((apr_size_t)ate < tf->HeadLength)
               {
                   b = apr_bucket_transient_create((char*)tf->pHead + ate, 
  -                                            (apr_size_t)tf->HeadLength - ate);
  +                                                tf->HeadLength - ate);
                   APR_BRIGADE_INSERT_TAIL(bb, b);
               }
           }
           else if (tf->pHead && tf->HeadLength) {
               b = apr_bucket_transient_create((char*)tf->pHead, 
  -                                           (apr_size_t)tf->HeadLength);
  +                                            tf->HeadLength);
               APR_BRIGADE_INSERT_TAIL(bb, b);
           }
   
  -        b = apr_bucket_file_create(fd, (apr_off_t)tf->Offset, 
  -                                  (apr_size_t)tf->BytesToWrite, r->pool);
  +        b = apr_bucket_file_create(fd, tf->Offset, 
  +                                   tf->BytesToWrite, r->pool);
           APR_BRIGADE_INSERT_TAIL(bb, b);
           
  -        if (tf->pTail && (apr_size_t)tf->TailLength) {
  +        if (tf->pTail && tf->TailLength) {
               b = apr_bucket_transient_create((char*)tf->pTail, 
  -                                           (apr_size_t)tf->TailLength);
  +                                            tf->TailLength);
               APR_BRIGADE_INSERT_TAIL(bb, b);
           }
           
  @@ -1086,20 +1087,20 @@
                                     = (LPHSE_SEND_HEADER_EX_INFO) lpvBuffer;
           /* XXX: ignore shi->fKeepConn?  We shouldn't need the advise */
           /* r->connection->keepalive = shi->fKeepConn; */
  -        apr_off_t ate = SendResponseHeaderEx(cid, shi->pszStatus, 
  -                                             shi->pszHeader,
  -                                             shi->cchStatus, 
  -                                             shi->cchHeader);
  +        apr_ssize_t ate = SendResponseHeaderEx(cid, shi->pszStatus, 
  +                                               shi->pszHeader,
  +                                               shi->cchStatus, 
  +                                               shi->cchHeader);
           if (ate < 0) {
               SetLastError(TODO_ERROR);
               return FALSE;
           }
  -        else if (ate < (apr_off_t)shi->cchHeader) {
  +        else if ((apr_size_t)ate < shi->cchHeader) {
               apr_bucket_brigade *bb;
               apr_bucket *b;
               bb = apr_brigade_create(cid->r->pool);
   	    b = apr_bucket_transient_create(shi->pszHeader + ate, 
  -                                           (apr_size_t)shi->cchHeader - ate);
  +                                            shi->cchHeader - ate);
   	    APR_BRIGADE_INSERT_TAIL(bb, b);
               b = apr_bucket_flush_create();
   	    APR_BRIGADE_INSERT_TAIL(bb, b);
  
  
  

Mime
View raw message