Update of /cvsroot/playerstage/code/player/server/drivers/wifi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25787/server/drivers/wifi

Modified Files:
      Tag: b_thjc_dynamic_arrays
        aodv.cc linuxwifi.cc .cvsignore 
Log Message:
Merged some changes from head a while back

Work on updating drivers, A-J done,  laser is next

Index: .cvsignore
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/wifi/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.1.20.1
diff -C2 -d -r1.1 -r1.1.20.1
*** .cvsignore  29 Nov 2002 17:08:25 -0000      1.1
--- .cvsignore  10 Oct 2007 09:26:03 -0000      1.1.20.1
***************
*** 1,2 ****
--- 1,5 ----
  Makefile
  Makefile.in
+ .deps
+ *.la
+ *.a

Index: aodv.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/wifi/aodv.cc,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -C2 -d -r1.11 -r1.11.2.1
*** aodv.cc     23 Aug 2007 19:58:48 -0000      1.11
--- aodv.cc     10 Oct 2007 09:26:03 -0000      1.11.2.1
***************
*** 95,98 ****
--- 95,99 ----
    // File handle for the /proc file system entry
    protected: FILE *file;
+   player_wifi_data_t data;
  };
  
***************
*** 132,135 ****
--- 133,137 ----
      return -1;
    }
+   memset(&data, 0, sizeof(data));
    return 0;
  }
***************
*** 140,143 ****
--- 142,146 ----
  {
    fclose(this->file);
+   free(data.links);
    return 0;
  }
***************
*** 149,153 ****
    int n, link_count;
    player_wifi_link_t *link;
-   player_wifi_data_t data;
    char ip[16], next_ip[16];
    int seq, hop;
--- 152,155 ----
***************
*** 178,182 ****
      printf("aodv %s : %d\n", ip, level);
  
!     link = data.links + link_count++;
      strncpy((char*)link->ip, ip, sizeof(link->ip));
      //link->qual_type = PLAYER_WIFI_QUAL_UNKNOWN;
--- 180,192 ----
      printf("aodv %s : %d\n", ip, level);
  
!     if (link_count > data.links_count)
!     {
!       data.links = realloc(data.links, sizoef(data.links[0])*link_count);
!       data.links_count++;
!     }
!     assert(data.links);
!     link = data.links[link_count];
!     link_count++;
! 
      strncpy((char*)link->ip, ip, sizeof(link->ip));
      //link->qual_type = PLAYER_WIFI_QUAL_UNKNOWN;
***************
*** 184,191 ****
      link->noise = (noise);
    }
-   data.links_count = (link_count);
  
    // Copy data to the server's buffer
!   Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_WIFI_DATA_STATE, &data, 
sizeof(data), NULL);
  
  
--- 194,200 ----
      link->noise = (noise);
    }
  
    // Copy data to the server's buffer
!   Publish(device_addr, PLAYER_MSGTYPE_DATA, PLAYER_WIFI_DATA_STATE, &data);
  
  

Index: linuxwifi.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/wifi/linuxwifi.cc,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -C2 -d -r1.18 -r1.18.2.1
*** linuxwifi.cc        23 Aug 2007 19:58:48 -0000      1.18
--- linuxwifi.cc        10 Oct 2007 09:26:03 -0000      1.18.2.1
***************
*** 298,301 ****
--- 298,302 ----
    uint8_t mode = 0;
    player_wifi_data_t wifi_data;
+   player_wifi_link_t wifi_link;
    
    struct timeval curr;
***************
*** 424,427 ****
--- 425,429 ----
      
    wifi_data.links_count = 1;
+   wifi_data.links = &wifi_link;
    strncpy((char*)wifi_data.links[0].ip, "0.0.0.0", 
sizeof(wifi_data.links[0].ip));
    wifi_data.links[0].ip_count = sizeof(wifi_data.links[0].ip);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to