*/
#include "includes.h"
+#include "nmbd/nmbd.h"
uint16 samba_nb_type = 0; /* samba's NetBIOS name type */
struct name_record *namerec;
time_t time_now = time(NULL);
+ if (num_ips == 0) {
+ return false;
+ }
+
namerec = SMB_MALLOC_P(struct name_record);
if( NULL == namerec ) {
DEBUG( 0, ( "add_name_to_subnet: malloc fail.\n" ) );
******************************************************************/
void standard_fail_register( struct subnet_record *subrec,
- struct response_record *rrec,
struct nmb_name *nmbname )
{
struct name_record *namerec;
return;
}
- for( bcast_subrecs = FIRST_SUBNET, i = 0; bcast_subrecs; bcast_subrecs = NEXT_SUBNET_EXCLUDING_UNICAST(bcast_subrecs), i++ )
+ for( bcast_subrecs = FIRST_SUBNET, i = 0; bcast_subrecs &&
+ i < num_ips;
+ bcast_subrecs = NEXT_SUBNET_EXCLUDING_UNICAST(bcast_subrecs), i++ ) {
iplist[i] = bcast_subrecs->myip;
+ }
+ num_ips = i;
}
add_name_to_subnet(subrec,"*",0x0,samba_nb_type, PERMANENT_TTL,