From a09f8c305256b94b078f7d293fe1fc9b56d28810 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 21 Jan 2005 20:38:33 +0000 Subject: r4909: fixed name_trn_id generation (thanks to metze for spotting the bug!) (This used to be commit 9d2d16ce5fd57cad01ddaf1112beed916cc2088d) --- source4/libcli/nbt/nbtsocket.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/libcli') diff --git a/source4/libcli/nbt/nbtsocket.c b/source4/libcli/nbt/nbtsocket.c index 8b212fb555..b0248b6de0 100644 --- a/source4/libcli/nbt/nbtsocket.c +++ b/source4/libcli/nbt/nbtsocket.c @@ -345,10 +345,12 @@ 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+(generate_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; + req->request->name_trn_id = id; te.next_event = timeout; te.handler = nbt_name_socket_timeout; -- cgit