[Olsr-cvs] olsrd-current/lib/powerinfo/src olsrd_power.c,1.15,1.16

Andreas T�nnesen (spam-protected)
Sat Jan 7 09:17:47 CET 2006


Update of /cvsroot/olsrd/olsrd-current/lib/powerinfo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16043/powerinfo/src

Modified Files:
	olsrd_power.c 
Log Message:
Adapted plugins to the cleanup of external variables in olsrd

Index: olsrd_power.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/powerinfo/src/olsrd_power.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** olsrd_power.c	30 Dec 2005 02:24:00 -0000	1.15
--- olsrd_power.c	7 Jan 2006 08:17:44 -0000	1.16
***************
*** 309,313 ****
  	  message->v4.olsr_vtime = double_to_me(7.5);
  	  message->v4.olsr_msgsize = htons(sizeof(struct olsrmsg));
! 	  memcpy(&message->v4.originator, &main_addr, ipsize);
  	  message->v4.ttl = MAX_TTL;
  	  message->v4.hopcnt = 0;
--- 309,313 ----
  	  message->v4.olsr_vtime = double_to_me(7.5);
  	  message->v4.olsr_msgsize = htons(sizeof(struct olsrmsg));
! 	  memcpy(&message->v4.originator, &olsr_cnf->main_addr, olsr_cnf->ipsize);
  	  message->v4.ttl = MAX_TTL;
  	  message->v4.hopcnt = 0;
***************
*** 332,336 ****
  	  message->v6.olsr_vtime = double_to_me(7.5);
  	  message->v6.olsr_msgsize = htons(sizeof(struct olsrmsg));
! 	  memcpy(&message->v6.originator, &main_addr, ipsize);
  	  message->v6.ttl = MAX_TTL;
  	  message->v6.hopcnt = 0;
--- 332,336 ----
  	  message->v6.olsr_vtime = double_to_me(7.5);
  	  message->v6.olsr_msgsize = htons(sizeof(struct olsrmsg));
! 	  memcpy(&message->v6.originator, &olsr_cnf->main_addr, olsr_cnf->ipsize);
  	  message->v6.ttl = MAX_TTL;
  	  message->v6.hopcnt = 0;
***************
*** 374,378 ****
  
    /* Fetch the originator of the messsage */
!   memcpy(&originator, &m->v4.originator, ipsize);
  
    /* Fetch the message based on IP version */
--- 374,378 ----
  
    /* Fetch the originator of the messsage */
!   memcpy(&originator, &m->v4.originator, olsr_cnf->ipsize);
  
    /* Fetch the message based on IP version */
***************
*** 389,393 ****
  
    /* Check if message originated from this node */
!   if(memcmp(&originator, &main_addr, ipsize) == 0)
      /* If so - back off */
      return;
--- 389,393 ----
  
    /* Check if message originated from this node */
!   if(memcmp(&originator, &olsr_cnf->main_addr, olsr_cnf->ipsize) == 0)
      /* If so - back off */
      return;
***************
*** 453,457 ****
        entry = entry->next)
      {
!       if(memcmp(originator, &entry->originator, ipsize) == 0)
  	{
  	  entry->source_type = message->source_type;
--- 453,457 ----
        entry = entry->next)
      {
!       if(memcmp(originator, &entry->originator, olsr_cnf->ipsize) == 0)
  	{
  	  entry->source_type = message->source_type;
***************
*** 478,482 ****
    /* Fill struct */
  
!   memcpy(&entry->originator, originator, ipsize);
  
    entry->source_type = message->source_type;
--- 478,482 ----
    /* Fill struct */
  
!   memcpy(&entry->originator, originator, olsr_cnf->ipsize);
  
    entry->source_type = message->source_type;





More information about the Olsr-cvs mailing list