Unix SMB/Netbios implementation.
Version 1.9.
NBT netbios routines to synchronise browse lists
- Copyright (C) Andrew Tridgell 1994-1995
+ Copyright (C) Andrew Tridgell 1994-1997
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
/* creates workgroup on remote subnet */
if ((w = find_workgroupstruct(d,sname,True)))
{
- if (d->my_interface)
- {
- announce_request(w, d->bcast_ip);
- }
+ announce_request(w, d->bcast_ip);
}
}
do a NetServerEnum and update our server and workgroup databases.
******************************************************************/
void sync_browse_lists(struct subnet_record *d, struct work_record *work,
- char *name, int nm_type, struct in_addr ip)
+ char *name, int nm_type, struct in_addr ip, BOOL local)
{
- if (!d || !work || !AM_MASTER(work)) return;
+ uint32 local_type = local ? SV_TYPE_LOCAL_LIST_ONLY : 0;
+
+ if (!d || !work ) return;
+
+ if(d != wins_subnet) {
+ DEBUG(0,
+ ("sync_browse_lists: ERROR sync requested on non-WINS subnet.\n"));
+ return;
+ }
pid = getpid();
uid = getuid();
{
if (cli_send_login(NULL,NULL,True,True))
{
- add_info(d, work, SV_TYPE_DOMAIN_ENUM);
- add_info(d, work, SV_TYPE_ALL&~SV_TYPE_DOMAIN_ENUM);
+ add_info(d, work, local_type|SV_TYPE_DOMAIN_ENUM);
+ add_info(d, work, local_type|(SV_TYPE_ALL&
+ ~(SV_TYPE_DOMAIN_ENUM|SV_TYPE_LOCAL_LIST_ONLY)));
}
close_sockets();