This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
static int generate_trn_id(void)
{
- static int trn_id;
+ uint16 id;
- if (trn_id == 0) {
- sys_srandom(sys_getpid());
- }
-
- trn_id = sys_random();
+ generate_random_buffer((uint8 *)&id, sizeof(id));
- return trn_id % (unsigned)0x7FFF;
+ return id % (unsigned)0x7FFF;
}
/****************************************************************************