Revision: 201035 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 15 Sep 2010 12:23:51 +0300
branchRCL_3
changeset 64 1934667b0e2b
parent 61 269724087bed
child 72 4b59561a31c0
Revision: 201035 Kit: 201036
bluetoothengine/bteng/data/backup_registration.xml
bluetoothengine/bteng/group/bld.inf
bluetoothengine/bteng/rom/bteng.iby
bluetoothengine/btmac/src/btmac/btmsaudio.cpp
bluetoothengine/btmac/src/btmac/btmsyncsock.cpp
cbsatplugin/atmisccmdplugin/inc/atmisccmdpluginconsts.h
cbsatplugin/atmisccmdplugin/src/atcommandparser.cpp
cbsatplugin/atmisccmdplugin/src/scpbrcommandhandler.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bluetoothengine/bteng/data/backup_registration.xml	Wed Sep 15 12:23:51 2010 +0300
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+	<proxy_data_manager sid = "0x10202BE9" />
+	<restore requires_reboot = "yes"/>
+</backup_registration>
--- a/bluetoothengine/bteng/group/bld.inf	Tue Sep 14 21:37:10 2010 +0300
+++ b/bluetoothengine/bteng/group/bld.inf	Wed Sep 15 12:23:51 2010 +0300
@@ -39,6 +39,8 @@
 
 ../data/btrfs.txt                           z:/resource/btrfs.txt
 
+../data/backup_registration.xml             z:/private/10005950/backup_registration.xml
+
 
 PRJ_MMPFILES
 bteng.mmp
--- a/bluetoothengine/bteng/rom/bteng.iby	Tue Sep 14 21:37:10 2010 +0300
+++ b/bluetoothengine/bteng/rom/bteng.iby	Wed Sep 15 12:23:51 2010 +0300
@@ -32,6 +32,7 @@
 data=ZPRIVATE\10003A3F\APPS\bttoggle_reg.rsc 			Private\10003a3f\apps\bttoggle_reg.rsc
 data=DATAZ_\RESOURCE_FILES_DIR\btengsdp.rsc       RESOURCE_FILES_DIR\btengsdp.rsc
 data=DATAZ_\RESOURCE_FILES_DIR\btrfs.txt       RESOURCE_FILES_DIR\btrfs.txt
+data=ZPRIVATE\10005950\backup_registration.xml			private\10005950\backup_registration.xml
 
 ECOM_PLUGIN( btbearer.dll, btbearer.rsc )
 ECOM_PLUGIN( btrfsplugin.dll, btrfsplugin.rsc )
--- a/bluetoothengine/btmac/src/btmac/btmsaudio.cpp	Tue Sep 14 21:37:10 2010 +0300
+++ b/bluetoothengine/btmac/src/btmac/btmsaudio.cpp	Wed Sep 15 12:23:51 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -110,6 +110,13 @@
 
 void CBtmsAudio::SyncLinkDisconnectCompleteL(TInt /*aErr*/)
     {
+    // Need to delete the socket _now_ as the destructor is called from an async
+    // callback and that is too late - the listener RSocket owned by iSco needs
+    // to be shut down before the ChangeStateL() call below because Entry actions
+    // in Ctrl/Sniffm open a new one.
+    delete iSco;
+    iSco = NULL;
+
     CBtmsInuse* next;
     if (iRfcomm->IsInSniff())
         next = CBtmsSniffm::NewL(Parent(), SwapStateRfcommSock(), NULL); 
--- a/bluetoothengine/btmac/src/btmac/btmsyncsock.cpp	Tue Sep 14 21:37:10 2010 +0300
+++ b/bluetoothengine/btmac/src/btmac/btmsyncsock.cpp	Wed Sep 15 12:23:51 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -70,7 +70,7 @@
     TRACE_FUNC_ENTRY
     iScoAcceptor = TScoAcceptor(this);
     iSco->SetNotifier(iScoAcceptor);
-    iSco->AcceptConnection(TBTSyncPackets(KScoPacketTypeSpec));
+    User::LeaveIfError(iSco->AcceptConnection(TBTSyncPackets(KScoPacketTypeSpec)));
     if (aAllowEsco)
         {
         iESco_Acceptor = TScoAcceptor(this);
--- a/cbsatplugin/atmisccmdplugin/inc/atmisccmdpluginconsts.h	Tue Sep 14 21:37:10 2010 +0300
+++ b/cbsatplugin/atmisccmdplugin/inc/atmisccmdpluginconsts.h	Wed Sep 15 12:23:51 2010 +0300
@@ -54,7 +54,7 @@
 // Max buffer length for an MD5 digest - originally defined in SCPServerInterface.h
 const TInt KSCPMaxHashLength( 32 );
 
-const TInt KSCPBRDefaultSizeOfOneEntry( 320 );
+const TInt KSCPBRDefaultSizeOfOneEntry( 400 );
 const TInt KSCPBRMaxNameLength( 64 );
 const TInt KSCPBRMaxNumberLength( 32 );
 const TInt KSCPBRMaxEmailLength( 64 );
--- a/cbsatplugin/atmisccmdplugin/src/atcommandparser.cpp	Tue Sep 14 21:37:10 2010 +0300
+++ b/cbsatplugin/atmisccmdplugin/src/atcommandparser.cpp	Wed Sep 15 12:23:51 2010 +0300
@@ -254,8 +254,8 @@
     if(!iCmd.Eos())
         {
         chr = iCmd.Peek();
-        while(!iCmd.Eos() && chr != ',' && !chr.IsSpace() && !chr.IsControl())
-            {// Stop at any of those chars: comma, space or control
+        while(!iCmd.Eos() && chr != ',' && !chr.IsControl())
+            {// Stop at any comma or control character
             iCmd.Inc();
             chr = iCmd.Peek();
             }
@@ -264,12 +264,30 @@
     // Extract the token at this point            
     TPtrC8 retVal = iCmd.MarkedToken();
     
+	//ignore all space characters at the end
+    if(retVal.Length() > 1)
+    {
+        TInt pos = retVal.Length() - 1; 
+        for ( ; pos >= 0; pos-- )
+            {
+            const TChar ch( retVal[pos] );
+            if( !ch.IsSpace() )
+                {
+                break;
+                }
+            }
+        retVal.Set( retVal.Mid( 0, pos + 1 ) );
+    }
+    
+    
     // Skip comma, space and control chars
-    while(!iCmd.Eos() && (chr == ',' || chr.IsSpace() || chr.IsControl()))
-        {
-        iCmd.Inc();
-        chr = iCmd.Peek();
-        }
+    do
+      {
+      iCmd.Inc();
+      chr = iCmd.Peek();
+      }
+    while(!iCmd.Eos() && (chr.IsSpace() || chr.IsControl()));
+    
     TRACE_FUNC_EXIT
     return retVal;
     }
@@ -310,8 +328,21 @@
         }
     else
         {
-        TLex8 lex(param);
-        retVal = lex.Val(aValue);
+        //check if param contains only digits - TLex doesn't do that
+        for(TInt pos = param.Length() - 1; pos >= 0; pos--)
+            {
+            if(( param[pos] < '0' ) || ( param[pos] > '9' ))
+                {
+                retVal = KErrArgument;
+                break;
+                }
+            }
+        
+        if(retVal == KErrNone)
+            {
+            TLex8 lex(param);
+            retVal = lex.Val(aValue);
+            }
         }
     TRACE_FUNC_EXIT
     return retVal;
--- a/cbsatplugin/atmisccmdplugin/src/scpbrcommandhandler.cpp	Tue Sep 14 21:37:10 2010 +0300
+++ b/cbsatplugin/atmisccmdplugin/src/scpbrcommandhandler.cpp	Wed Sep 15 12:23:51 2010 +0300
@@ -392,7 +392,8 @@
         {
         AppendEntryL(iEntries[i]);
         }
-
+    iReply.Append(KCRLF);
+    
     TRACE_FUNC_EXIT
     }