summaryrefslogtreecommitdiff
path: root/source4/nbt_server/wins
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-31 11:19:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:34 -0500
commit24c54281a97832a3a82ed2101ebd16de96f41bd9 (patch)
treee914f5f71f6c3a35efef42164fbcb5f72a0c191c /source4/nbt_server/wins
parent706ef631f7d456de93078b8d0dca2c22e39d7ad1 (diff)
downloadsamba-24c54281a97832a3a82ed2101ebd16de96f41bd9.tar.gz
samba-24c54281a97832a3a82ed2101ebd16de96f41bd9.tar.bz2
samba-24c54281a97832a3a82ed2101ebd16de96f41bd9.zip
r12647: make use of the str_list_add function
metze (This used to be commit e47873a1a391c8a8b469528d44c17dfe1ea2f553)
Diffstat (limited to 'source4/nbt_server/wins')
-rw-r--r--source4/nbt_server/wins/winsserver.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source4/nbt_server/wins/winsserver.c b/source4/nbt_server/wins/winsserver.c
index 449a11f4fc..d6eeb69ada 100644
--- a/source4/nbt_server/wins/winsserver.c
+++ b/source4/nbt_server/wins/winsserver.c
@@ -601,13 +601,11 @@ static void nbtd_winsserver_query(struct nbt_name_socket *nbtsock,
* the record is released or tombstoned
*/
if (rec->type == WREPL_TYPE_GROUP) {
- addresses = talloc_array(packet, const char *, 2);
- if (addresses == NULL) {
- nbtd_negative_name_query_reply(nbtsock, packet, src);
- return;
+ addresses = str_list_add(NULL, "255.255.255.255");
+ talloc_steal(packet, addresses);
+ if (!addresses) {
+ goto notfound;
}
- addresses[0] = "255.255.255.255";
- addresses[1] = NULL;
goto found;
}