From 250c9801197ea1c949bd94c1c891f81ab118b130 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Nov 2002 23:15:52 +0000 Subject: Removed global_myworkgroup, global_myname, global_myscope. Added liberal dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a) --- source3/nmbd/nmbd_packets.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'source3/nmbd/nmbd_packets.c') diff --git a/source3/nmbd/nmbd_packets.c b/source3/nmbd/nmbd_packets.c index d252b98ed69..894f6bb7d6d 100644 --- a/source3/nmbd/nmbd_packets.c +++ b/source3/nmbd/nmbd_packets.c @@ -1080,15 +1080,14 @@ static void process_browse_packet(struct packet_struct *p, char *buf,int len) struct dgram_packet *dgram = &p->packet.dgram; int command = CVAL(buf,0); struct subnet_record *subrec = find_subnet_for_dgram_browse_packet(p); - extern pstring global_scope; /* Drop the packet if it's a different NetBIOS scope, or the source is from one of our names. */ - if (!strequal(dgram->dest_name.scope, global_scope)) + if (!strequal(dgram->dest_name.scope, global_scope())) { DEBUG(7,("process_browse_packet: Discarding datagram from IP %s. Scope (%s) \ -mismatch with our scope (%s).\n", inet_ntoa(p->ip), dgram->dest_name.scope, global_scope)); +mismatch with our scope (%s).\n", inet_ntoa(p->ip), dgram->dest_name.scope, global_scope())); return; } @@ -1193,15 +1192,14 @@ static void process_lanman_packet(struct packet_struct *p, char *buf,int len) struct dgram_packet *dgram = &p->packet.dgram; int command = SVAL(buf,0); struct subnet_record *subrec = find_subnet_for_dgram_browse_packet(p); - extern pstring global_scope; /* Drop the packet if it's a different NetBIOS scope, or the source is from one of our names. */ - if (!strequal(dgram->dest_name.scope, global_scope)) + if (!strequal(dgram->dest_name.scope, global_scope())) { DEBUG(7,("process_lanman_packet: Discarding datagram from IP %s. Scope (%s) \ -mismatch with our scope (%s).\n", inet_ntoa(p->ip), dgram->dest_name.scope, global_scope)); +mismatch with our scope (%s).\n", inet_ntoa(p->ip), dgram->dest_name.scope, global_scope())); return; } @@ -1932,8 +1930,8 @@ BOOL listen_for_packets(BOOL run_election) Construct and send a netbios DGRAM. **************************************************************************/ BOOL send_mailslot(BOOL unique, char *mailslot,char *buf,int len, - char *srcname, int src_type, - char *dstname, int dest_type, + const char *srcname, int src_type, + const char *dstname, int dest_type, struct in_addr dest_ip,struct in_addr src_ip, int dest_port) { -- cgit