equal
deleted
inserted
replaced
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
40 if( KNullHandle != iHandle ) |
40 if( KNullHandle != iHandle ) |
41 { |
41 { |
42 User::Leave( KErrAlreadyExists ); |
42 User::Leave( KErrAlreadyExists ); |
43 } |
43 } |
44 |
44 |
45 const TInt err = CreateSession(KCleSrvName, iVersion, KCleSrvMsgSlots); |
45 TInt err = CreateSession(KCleSrvName, iVersion, KCleSrvMsgSlots); |
46 if( (KErrNotFound == err) || (KErrServerTerminated == err) ) |
46 if( (KErrNotFound == err) || (KErrServerTerminated == err) ) |
47 { |
47 { |
48 User::LeaveIfError( CCleServer::StartCleSrv(KCleSrvName) ); |
48 err = CCleServer::StartCleSrv(KCleSrvName); |
|
49 DEBUGPRINT2(_L("Starting CleSrv completed with %d"),err); |
|
50 if (KErrNone != err && KErrAlreadyExists != err) |
|
51 { |
|
52 User::Leave(err); |
|
53 } |
|
54 |
49 User::LeaveIfError( CreateSession(KCleSrvName, iVersion, KCleSrvMsgSlots) ); |
55 User::LeaveIfError( CreateSession(KCleSrvName, iVersion, KCleSrvMsgSlots) ); |
50 } |
56 } |
51 else |
57 else |
52 { |
58 { |
53 User::LeaveIfError( err ); |
59 User::LeaveIfError( err ); |
68 if( KNullHandle != iHandle ) |
74 if( KNullHandle != iHandle ) |
69 { |
75 { |
70 User::Leave( KErrAlreadyExists ); |
76 User::Leave( KErrAlreadyExists ); |
71 } |
77 } |
72 |
78 |
73 const TInt err = CreateSession(aServerName, iVersion, KCleSrvMsgSlots); |
79 TInt err = CreateSession(aServerName, iVersion, KCleSrvMsgSlots); |
74 if( (KErrNotFound == err) || (KErrServerTerminated == err) ) |
80 if( (KErrNotFound == err) || (KErrServerTerminated == err) ) |
75 { |
81 { |
76 User::LeaveIfError( CCleServer::StartCleSrv(aServerName) ); |
82 err = CCleServer::StartCleSrv(aServerName); |
|
83 |
|
84 DEBUGPRINT2(_L("Starting CleSrv completed with %d"),err); |
|
85 if (KErrNone != err && KErrAlreadyExists != err) |
|
86 { |
|
87 User::Leave(err); |
|
88 } |
|
89 |
77 User::LeaveIfError( CreateSession(aServerName, iVersion, KCleSrvMsgSlots) ); |
90 User::LeaveIfError( CreateSession(aServerName, iVersion, KCleSrvMsgSlots) ); |
78 } |
91 } |
79 else |
92 else |
80 { |
93 { |
81 User::LeaveIfError( err ); |
94 User::LeaveIfError( err ); |