Project

General

Profile

Revision 118

updated server for new wl library changes

View differences:

ColonetServer.cpp
8 8
 * @date 10/31/06
9 9
 */
10 10

  
11
#include <colonet_wireless.h>
11
#include <arpa/inet.h>
12
#include <fcntl.h>
13
#include <errno.h>
14
#include <netinet/in.h>
15
#include <string.h>
12 16
#include <sys/select.h>
13 17
#include <sys/socket.h>
14
#include <netinet/in.h>
15
#include <errno.h>
16
#include <arpa/inet.h>
17 18

  
18
#include <fcntl.h>
19

  
20 19
#include <colonet_wireless.h>
21 20

  
22 21
#include "includes/ColonetServer.h"
......
149 148
        logger.logMessage(LOG_TYPE_CONNECT, log_buffer);
150 149
      }
151 150

  
152
      if (connection_pool.check_clients(wireless) < 0) {
151
      if (connection_pool.check_clients() < 0) {
153 152
        printf("\tThere was an error trying to update the clients.");
154 153
        continue;
155 154
      }
......
181 180
    log_filename = optionsG.log_filename;
182 181
  }
183 182

  
184
  wireless = new ColonetWireless(optionsG.wireless_port, 
185
                                 wirelessMessageHandler, log_filename, 
186
                                 /*!optionsG.listener_mode*/false, true);
187
  //Note: last arg set to true ignores token ring;  in general, this should
188
  //probably be false (changed for demo purposes)
183
  colonet_wl_init(optionsG.wireless_port, wirelessMessageHandler,
184
                  log_filename);
189 185

  
190
  if (!wireless->run_listener_thread()) {
186
  if (!colonet_wl_run_listener_thread()) {
187
    fprintf(stderr, "%s: colonet_wl_run_listener_thread failed.\n",
188
            __FUNCTION__);
191 189
    return -1;
192 190
  }
193 191

  

Also available in: Unified diff