62 |
|
const uint8 router_mac_addr[6] = { '4', '2', '6', '7', '7', '9' }; |
63 |
|
uint32 router_ip_address = 0; |
64 |
|
bool raw_sockets_available = false; |
65 |
– |
bool m_router_enabled = true; |
65 |
|
|
66 |
|
|
67 |
|
|
156 |
|
return 0; |
157 |
|
} |
158 |
|
|
159 |
< |
void router_init(void) |
159 |
> |
bool router_init(void) |
160 |
|
{ |
161 |
|
InitializeCriticalSection( &router_section ); |
162 |
|
|
163 |
< |
m_router_enabled = PrefsFindBool("routerenabled"); |
165 |
< |
|
166 |
< |
if(m_router_enabled && dynsockets_init()) { |
163 |
> |
if(dynsockets_init()) { |
164 |
|
char me[128]; |
165 |
|
if( _gethostname(me, sizeof(me)) == SOCKET_ERROR ) { |
166 |
|
D(bug("gethostname() failed, error = %d\r\n", _WSAGetLastError())); |
180 |
|
init_tcp(); |
181 |
|
init_udp(); |
182 |
|
init_ftp(); |
183 |
< |
} else { |
187 |
< |
m_router_enabled = false; |
183 |
> |
return true; |
184 |
|
} |
185 |
+ |
|
186 |
+ |
return false; |
187 |
|
} |
188 |
|
|
189 |
|
void router_final(void) |