From 6f0aef31cdfa9b486d1f2e0f097e071830f5600d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Jan 2005 13:13:24 +0000 Subject: r4898: - removed the unused wins_srv_*() code - expanded the generic async name resolver to try multiple methods - added wins resolutions to the list of methods tried - fixed up the random trn id generation to use the good random generator (This used to be commit 266fd2751c01808e5a18d4094032af50554ceb7a) --- source4/libcli/nbt/nbtsocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli/nbt/nbtsocket.c') diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c index 6d5b450a31..865c542ca8 100644 --- a/source4/libcli/nbt/nbtsocket.c +++ b/source4/libcli/nbt/nbtsocket.c @@ -331,7 +331,7 @@ struct nbt_name_request *nbt_name_request_send(struct nbt_name_socket *nbtsock, /* we select a random transaction id unless the user supplied one */ if (req->request->name_trn_id == 0) { - req->request->name_trn_id = random() % UINT16_MAX; + req->request->name_trn_id = generate_random() % UINT16_MAX; } /* choose the next available transaction id >= the one asked for. @@ -342,7 +342,7 @@ struct nbt_name_request *nbt_name_request_send(struct nbt_name_socket *nbtsock, id = idr_get_new_above(req->nbtsock->idr, req, req->request->name_trn_id, UINT16_MAX); if (id == -1) { - id = idr_get_new_above(req->nbtsock->idr, req, 1+(random()%(UINT16_MAX/2)), + id = idr_get_new_above(req->nbtsock->idr, req, 1+(generate_random()%(UINT16_MAX/2)), UINT16_MAX); } if (id == -1) goto failed; -- cgit