Changeset 1741


Ignore:
Timestamp:
Jan 24, 2008 7:20:09 PM (12 years ago)
Author:
bennylp
Message:

Fixed libsrtp random string generation on Win32

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/third_party/srtp/crypto/rng/rand_source.c

    r1738 r1741  
    133133  uint8_t *dst = (uint8_t *)dest; 
    134134 
     135#ifdef PJ_DEV_URANDOM 
    135136  /* First try with /dev/urandom, if it's opened */ 
    136137  if (dev_random_fdes >= 0) { 
     
    138139        return err_status_ok;   /* success */ 
    139140  } 
     141#endif 
    140142 
    141143  /* Generic C-library (rand()) version */ 
     
    162164#endif 
    163165 
     166#if defined(DEV_URANDOM) || defined(PJ_DEV_URANDOM) 
    164167  if (dev_random_fdes >= 0) 
    165168    close(dev_random_fdes);   
    166169 
    167170  dev_random_fdes = RAND_SOURCE_NOT_READY; 
     171#endif 
    168172   
    169173  return err_status_ok;   
Note: See TracChangeset for help on using the changeset viewer.