From 9b9c23b19be5a90821e1075a76f8b94fdb2424e2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 1 Feb 2005 04:12:44 +0000 Subject: r5155: define ipv4address as a based IDL type, mapped to a "const char *" in the header, and defined on the wire as a 4 byte network byte order IP. This means the calling code doesn't have to worry about network byte order conversions. (This used to be commit 72048e37179dd5b9ada0c5280d2f0d8c23d1a17d) --- source4/nbt_server/query.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/nbt_server/query.c') diff --git a/source4/nbt_server/query.c b/source4/nbt_server/query.c index 9b9d1e29b9..2d2e75d51e 100644 --- a/source4/nbt_server/query.c +++ b/source4/nbt_server/query.c @@ -60,7 +60,9 @@ static void nbt_name_query_reply(struct nbt_name_socket *nbtsock, struct nbt_rdata_address, 1); if (packet->answers[0].rdata.netbios.addresses == NULL) goto failed; packet->answers[0].rdata.netbios.addresses[0].nb_flags = nb_flags; - packet->answers[0].rdata.netbios.addresses[0].ipaddr.addr = htonl(inet_addr(address)); + packet->answers[0].rdata.netbios.addresses[0].ipaddr = + talloc_strdup(packet->answers, address); + if (packet->answers[0].rdata.netbios.addresses[0].ipaddr == NULL) goto failed; DEBUG(7,("Sending name query reply for %s<%02x> at %s to %s:%d\n", name->name, name->type, src_address, address, src_port)); -- cgit