[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/stm25p Stm25pLogP.nc, 1.6, 1.7

Jonathan Hui jwhui at users.sourceforge.net
Tue Nov 27 19:15:32 PST 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/stm25p
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27509

Modified Files:
	Stm25pLogP.nc 
Log Message:

Fix bug where seeking to the different sector did not properly skip
over the address header.

Thanks to Razvan ME for reporting the bug.



Index: Stm25pLogP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/stm25p/Stm25pLogP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Stm25pLogP.nc	7 Jun 2007 16:14:22 -0000	1.6
--- Stm25pLogP.nc	28 Nov 2007 03:15:30 -0000	1.7
***************
*** 244,250 ****
  	  m_log_info[ id ].remaining = 0;
  	  m_rw_state = S_SEARCH_SEEK;
! 	  if ( m_log_info[ id ].read_addr != m_log_state[ id ].cookie )
  	    call Sector.read[ id ]( calcAddr( id, m_log_info[ id ].read_addr ),
  				    &m_header, sizeof( m_header ) );
  	  else
  	    signalDone( id, SUCCESS );
--- 244,252 ----
  	  m_log_info[ id ].remaining = 0;
  	  m_rw_state = S_SEARCH_SEEK;
! 	  if ( m_log_info[ id ].read_addr != m_log_state[ id ].cookie ) {
! 	    m_log_info[ id ].read_addr += sizeof( m_addr );
  	    call Sector.read[ id ]( calcAddr( id, m_log_info[ id ].read_addr ),
  				    &m_header, sizeof( m_header ) );
+ 	  }
  	  else
  	    signalDone( id, SUCCESS );



More information about the Tinyos-2-commits mailing list