httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/misc/win32 rand.c
Date Wed, 20 Sep 2000 15:38:00 GMT
wrowe       00/09/20 08:37:57

  Modified:    src/lib/apr/misc/win32 rand.c
  Log:
    Thanks Jeff.
  
  Revision  Changes    Path
  1.7       +3 -3      apache-2.0/src/lib/apr/misc/win32/rand.c
  
  Index: rand.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/win32/rand.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- rand.c	2000/09/20 14:55:54	1.6
  +++ rand.c	2000/09/20 15:37:52	1.7
  @@ -59,14 +59,14 @@
   apr_status_t apr_generate_random_bytes(unsigned char * buf, int length) 
   {
       HCRYPTPROV hProv;
  +    apr_status_t res = APR_SUCCESS;
   
       if (!CryptAcquireContext(&hProv,NULL,NULL,PROV_RSA_FULL,0)) {
   	return GetLastError();
       }
       if (!CryptGenRandom(hProv,length,buf)) {
  -        CryptReleaseContext(hProv, 0);
  -    	return GetLastError();
  +    	res = GetLastError();
       }
       CryptReleaseContext(hProv, 0);
  -    return APR_SUCCESS;
  +    return res;
   }
  
  
  

Mime
View raw message