diff options
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_nameregister.c | 8 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsproxy.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 7 |
3 files changed, 8 insertions, 9 deletions
diff --git a/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c index cdaef1a767..3223159ace 100644 --- a/source3/nmbd/nmbd_nameregister.c +++ b/source3/nmbd/nmbd_nameregister.c @@ -47,8 +47,8 @@ static void register_name_response(struct subnet_record *subrec, BOOL success = True; struct nmb_name *question_name = &rrec->packet->packet.nmb.question.question_name; struct nmb_name *answer_name = &nmb->answers->rr_name; - int ttl; - uint16 nb_flags; + int ttl = 0; + uint16 nb_flags = 0; struct in_addr registered_ip; /* Sanity check. Ensure that the answer name in the incoming packet is the @@ -169,8 +169,8 @@ static void register_name_timeout_response(struct subnet_record *subrec, BOOL bcast = sent_nmb->header.nm_flags.bcast; BOOL success = False; struct nmb_name *question_name = &sent_nmb->question.question_name; - uint16 nb_flags; - int ttl; + uint16 nb_flags = 0; + int ttl = 0; struct in_addr registered_ip; if(bcast) diff --git a/source3/nmbd/nmbd_winsproxy.c b/source3/nmbd/nmbd_winsproxy.c index 4f2326795d..36b9e7843c 100644 --- a/source3/nmbd/nmbd_winsproxy.c +++ b/source3/nmbd/nmbd_winsproxy.c @@ -39,7 +39,7 @@ static void wins_proxy_name_query_request_success( struct subnet_record *subrec, uint16 nb_flags; int num_ips; int i; - int ttl; + int ttl = 3600; /* By default one hour in the cache. */ struct in_addr *iplist; /* Extract the original packet and the original broadcast subnet from diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 725e6e3747..4a631a79b7 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -784,7 +784,7 @@ is one of our (WINS server) names. Denying registration.\n", namestr(question) ) if(namerec != NULL) { char ud[sizeof(struct userdata_struct) + sizeof(struct packet_struct *)]; - struct userdata_struct *userdata = (struct userdata_struct *)&ud; + struct userdata_struct *userdata = (struct userdata_struct *)ud; /* * First send a WACK to the registering machine. @@ -1059,7 +1059,7 @@ is one of our (WINS server) names. Denying registration.\n", namestr(question) ) if(namerec != NULL) { char ud[sizeof(struct userdata_struct) + sizeof(struct packet_struct *)]; - struct userdata_struct *userdata = (struct userdata_struct *)&ud; + struct userdata_struct *userdata = (struct userdata_struct *)ud; /* * First send a WACK to the registering machine. @@ -1202,7 +1202,7 @@ void send_wins_name_query_response(int rcode, struct packet_struct *p, if(rcode == 0) { - int same_net_index; + int same_net_index = -1; ttl = (namerec->death_time != PERMANENT_TTL) ? namerec->death_time - p->timestamp : lp_max_wins_ttl(); @@ -1229,7 +1229,6 @@ void send_wins_name_query_response(int rcode, struct packet_struct *p, * ones we know the netmask for. */ - same_net_index = -1; i = 0; if(is_local_net(p->ip)) |