From 0a516662abf927f96a66abb65034edab639b2682 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 6 Mar 2006 17:01:51 +0000 Subject: r13873: I think this is the longstanding wins server crash bug, not part of the changes I made but something that's been there a while.... Coverity bugid #41. Jeremy. (This used to be commit 2f6cf810eae124820a073258ffe62aace7a92d9c) --- source3/nmbd/nmbd_winsserver.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'source3/nmbd/nmbd_winsserver.c') diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index ddc9edfb06..f6f9d743b5 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -1246,25 +1246,24 @@ already exists in WINS as a GROUP name.\n", nmb_namestr(question) )); if ( namerec != NULL ) { pull_ascii_nstring(name, sizeof(name), namerec->name.name); - } else { - name[0] = '\0'; - } - - if( is_myname(name) ) { - if(!ismyip(from_ip)) { - DEBUG(3,("wins_process_name_registration_request: Attempt to register name %s. Name \ + if( is_myname(name) ) { + if(!ismyip(from_ip)) { + DEBUG(3,("wins_process_name_registration_request: Attempt to register name %s. Name \ is one of our (WINS server) names. Denying registration.\n", nmb_namestr(question) )); - send_wins_name_registration_response(RFS_ERR, 0, p); - return; - } else { - /* - * It's one of our names and one of our IP's - update the ttl. - */ - update_name_ttl(namerec, ttl); - wins_hook("refresh", namerec, ttl); - send_wins_name_registration_response(0, ttl, p); - return; + send_wins_name_registration_response(RFS_ERR, 0, p); + return; + } else { + /* + * It's one of our names and one of our IP's - update the ttl. + */ + update_name_ttl(namerec, ttl); + wins_hook("refresh", namerec, ttl); + send_wins_name_registration_response(0, ttl, p); + return; + } } + } else { + name[0] = '\0'; } /* -- cgit