Ignore:
Timestamp:
May 23, 2008, 6:56:41 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.29

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/nmbd/nmbd_subnetdb.c

    r44 r134  
    181181BOOL create_subnets(void)
    182182{   
    183         int num_interfaces = iface_count();
     183        int num_interfaces;
    184184        int i;
    185185        struct in_addr unicast_ip, ipzero;
    186186
    187         if(num_interfaces == 0) {
    188                 void (*saved_handler)(int);
    189 
     187  try_interfaces_again:
     188
     189        if (iface_count() == 0) {
    190190                DEBUG(0,("create_subnets: No local interfaces !\n"));
    191191                DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n"));
     192        }
     193
     194        while (iface_count() == 0) {
     195                void (*saved_handler)(int);
    192196
    193197                /*
     
    198202                saved_handler = CatchSignal( SIGTERM, SIGNAL_CAST SIG_DFL );
    199203
    200                 while (iface_count() == 0) {
    201                         sleep(5);
    202                         load_interfaces();
    203                 }
     204                sleep(5);
     205                load_interfaces();
    204206
    205207                /*
     
    242244        /* We must have at least one subnet. */
    243245        if (subnetlist == NULL) {
    244                 DEBUG(0,("create_subnets: unable to create any subnet from "
    245                                 "given interfaces. nmbd is terminating\n"));
    246                 return False;
     246                void (*saved_handler)(int);
     247
     248                DEBUG(0,("create_subnets: Unable to create any subnet from "
     249                                "given interfaces. Is your interface line in "
     250                                "smb.conf correct ?\n"));
     251
     252                saved_handler = CatchSignal( SIGTERM, SIGNAL_CAST SIG_DFL );
     253
     254                sleep(5);
     255                load_interfaces();
     256
     257                CatchSignal( SIGTERM, SIGNAL_CAST saved_handler );
     258                goto try_interfaces_again;
    247259        }
    248260
Note: See TracChangeset for help on using the changeset viewer.