Revision: 201023 RCL_3 PDK_3.0.1
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 21 Jun 2010 16:40:15 +0300
branchRCL_3
changeset 17 57266085a3a2
parent 15 27dcfaab8b5b
child 19 7e0ecb5b116a
Revision: 201023 Kit: 2010125
localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp
--- a/localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp	Wed Jun 09 10:39:48 2010 +0300
+++ b/localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp	Mon Jun 21 16:40:15 2010 +0300
@@ -261,6 +261,17 @@
         }
     
     iTotalSizeByte = iObexObject->Length();     // get size of receiving file
+    
+    if(iObexObject->Name().Length() > KMaxFileName)
+        {
+        TRACE_INFO( _L( "[oppreceiveservice] COPPController: PutPacketIndication truncating name of file being received\t" ) );
+        TRAPD(err, iObexObject->SetNameL(iObexObject->Name().Left(KMaxFileName)));
+        if(err != KErrNone)
+            {
+            return KErrAccessDenied;
+            }
+        }
+    
     iReceivingFileName = iObexObject->Name();   // get name of receiving file
     
     // Check that capacity is suitable as soon as possible
@@ -279,10 +290,7 @@
             return KErrDiskFull;
             }
         }
-    if(iObexObject->Name().Length() > KMaxFileName)
-        {
-        return KErrAccessDenied;
-        }
+
     if(iObexTransferState == ETransferPutDiskError)
         {
         return KErrDiskFull;