javaextensions/sensor/src.s60/csensorbase.cpp
branchRCL_3
changeset 24 6c158198356e
parent 14 04becd199f91
child 25 ae942d28ec0e
equal deleted inserted replaced
23:e5618cc85d74 24:6c158198356e
   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;