wlanutilities/wlansniffer/engine/server/src/wsfsession.cpp
branchRCL_3
changeset 15 dff6ebfd236f
parent 0 56b72877c1cb
child 44 a9524956f6b5
equal deleted inserted replaced
8:c2bc3f8c7777 15:dff6ebfd236f
   533     // don't take the ownership
   533     // don't take the ownership
   534     HBufC8* scanData = iServer.Engine()->GetScanResults();
   534     HBufC8* scanData = iServer.Engine()->GetScanResults();
   535         
   535         
   536     if ( scanData )
   536     if ( scanData )
   537         {
   537         {
       
   538         LOG_WRITEF( "scanData->Length() = %d aMessage.GetDesMaxLength(1) = %d", 
       
   539 					scanData->Length(), aMessage.GetDesMaxLength( 1 ) );
   538         if ( scanData->Length() > aMessage.GetDesMaxLength( 1 ) )
   540         if ( scanData->Length() > aMessage.GetDesMaxLength( 1 ) )
   539             {
   541             {
   540             // the data has changed
   542             // the data has changed
   541             // return error to client to alloc more buffer
   543             // return error to client to alloc more buffer
   542             sizeData() = scanData->Length();
   544             sizeData() = scanData->Length();
   543             aMessage.WriteL( 0, sizeData );
   545             aMessage.WriteL( 0, sizeData );
   544             }
   546             }
   545         else
   547         else
   546             {
   548             {
   547              // else we have enough buffer... copy the data
   549              // else we have enough buffer... copy the data
       
   550              sizeData() = scanData->Length();
       
   551              aMessage.WriteL( 0, sizeData );
   548              aMessage.WriteL( 1, *scanData, 0 );
   552              aMessage.WriteL( 1, *scanData, 0 );
   549             }
   553             }
   550         }
   554         }
   551     }
   555     }
   552     
   556