Home | History | Annotate | Download | only in src
      1 #include <stdlib.h>
      2 #include "xpl_Time.h"
      3 #include "dmtSessionProp.hpp"
      4 
      5 
      6 void DmtSessionProp::generateSessionID()
      7 {
      8   if ( m_nDirection == SYNCML_DM_CLIENT_INITIATED_SESSION )
      9   {
     10       XPL_CLK_CLOCK_T t = XPL_CLK_GetClock();
     11 
     12       /* The current time is given as seed for generating
     13        * pseudo random numbers */
     14       srand((UINT32)t);
     15       m_nSessionID = rand ();  // engine generated session ID
     16       if( !m_nSessionID )
     17           m_nSessionID = 1;
     18   }
     19 }
     20