Changeset 134 for branches/samba-3.0/source/nmbd/nmbd_subnetdb.c
- Timestamp:
- May 23, 2008, 6:56:41 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/nmbd/nmbd_subnetdb.c
r44 r134 181 181 BOOL create_subnets(void) 182 182 { 183 int num_interfaces = iface_count();183 int num_interfaces; 184 184 int i; 185 185 struct in_addr unicast_ip, ipzero; 186 186 187 if(num_interfaces == 0) { 188 void (*saved_handler)(int); 189 187 try_interfaces_again: 188 189 if (iface_count() == 0) { 190 190 DEBUG(0,("create_subnets: No local interfaces !\n")); 191 191 DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n")); 192 } 193 194 while (iface_count() == 0) { 195 void (*saved_handler)(int); 192 196 193 197 /* … … 198 202 saved_handler = CatchSignal( SIGTERM, SIGNAL_CAST SIG_DFL ); 199 203 200 while (iface_count() == 0) { 201 sleep(5); 202 load_interfaces(); 203 } 204 sleep(5); 205 load_interfaces(); 204 206 205 207 /* … … 242 244 /* We must have at least one subnet. */ 243 245 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; 247 259 } 248 260
Note:
See TracChangeset
for help on using the changeset viewer.