~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/Windows/router/router.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2006-06-01 01:11:16 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060601011116-xjhegbgyfsxag5fl
Tags: 0.9.20060529-1
* New upstream CVS snapshot.
* Update local cdbs snippet copyright-check.mk:
  + Broaden scan to also look for "(c)" by default.
  + Make egrep options configurable.
  + Ignore auto-tools files.
* Bump up standards-version to 3.7.2 (no changes needed).
* Let dh_strip do the stripping (not the make install target).

Show diffs side-by-side

added added

removed removed

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