summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
582900d)
better magic number initialization.
-static char rcsid[] = "$Id: ccp.c,v 1.9 1995/05/19 03:17:09 paulus Exp $";
+static char rcsid[] = "$Id: ccp.c,v 1.10 1995/06/06 01:52:23 paulus Exp $";
#endif
#include <syslog.h>
#endif
#include <syslog.h>
memset(&ccp_allowoptions[unit], 0, sizeof(ccp_options));
memset(&ccp_hisoptions[unit], 0, sizeof(ccp_options));
memset(&ccp_allowoptions[unit], 0, sizeof(ccp_options));
memset(&ccp_hisoptions[unit], 0, sizeof(ccp_options));
+ ccp_wantoptions[0].bsd_compress = 1;
ccp_wantoptions[0].bsd_bits = 12; /* default value */
ccp_allowoptions[0].bsd_compress = 1;
ccp_wantoptions[0].bsd_bits = 12; /* default value */
ccp_allowoptions[0].bsd_compress = 1;
-static char rcsid[] = "$Id: magic.c,v 1.4 1995/04/24 05:57:01 paulus Exp $";
+static char rcsid[] = "$Id: magic.c,v 1.5 1995/06/06 01:52:25 paulus Exp $";
#endif
#include <stdio.h>
#endif
#include <stdio.h>
* magic_init - Initialize the magic number generator.
*
* Attempts to compute a random number seed which will not repeat.
* magic_init - Initialize the magic number generator.
*
* Attempts to compute a random number seed which will not repeat.
- * The current method uses the current hostid and current time, currently.
+ * The current method uses the current hostid, current process ID
+ * and current time, currently.
*/
void
magic_init()
{
long seed;
*/
void
magic_init()
{
long seed;
- seed = gethostid() ^ time(NULL);
+ gettimeofday(&t, NULL);
+ seed = gethostid() ^ t.tv_sec ^ t.tv_usec ^ getpid();