javaextensions/sensor/src.s60/csensorbase.cpp
changeset 50 023eef975703
parent 21 2a9601315dfc
child 64 0ea12c182930
equal deleted inserted replaced
49:35baca0e7a2e 50:023eef975703
   137 }
   137 }
   138 
   138 
   139 void CSensorBase::AsyncCallback(TMethod aMethod)
   139 void CSensorBase::AsyncCallback(TMethod aMethod)
   140 {
   140 {
   141     JELOG2(ESensor);
   141     JELOG2(ESensor);
   142     iMethodArray.Append(aMethod);
   142     TInt err = iMethodArray.Append(aMethod);
       
   143     // if there was error when adding the method to array then just return
       
   144     if ( err  )
       
   145     {
       
   146         ELOG2(ESensor, "CSensorBase::AsyncCallback - Error (code = %d) when "
       
   147               "adding method (type = %d) to method buffer.", err, aMethod.iMethodType);
       
   148         return;
       
   149     }
   143 
   150 
   144     // If there is old request ongoing, wait it for completion
   151     // If there is old request ongoing, wait it for completion
   145     if (iMethodArray.Count() > 1)
   152     if (iMethodArray.Count() > 1)
   146     {
   153     {
   147         return;
   154         return;