equal
deleted
inserted
replaced
219 { |
219 { |
220 iContext.iNodeActivity->SetError(KErrNone); |
220 iContext.iNodeActivity->SetError(KErrNone); |
221 } |
221 } |
222 } |
222 } |
223 |
223 |
|
224 |
|
225 DEFINE_SMELEMENT(TAwaitingStop, NetStateMachine::MState, IpProtoCpr::TContext) |
|
226 TBool TAwaitingStop::Accept() |
|
227 { |
|
228 /* |
|
229 Please note, in order for this to work, ESock needs to export the Accept function |
|
230 of the CoreNetStates::TAwaitingStop. |
|
231 */ |
|
232 CoreNetStates::TAwaitingStop state(iContext); |
|
233 if (state.Accept()) |
|
234 { |
|
235 if (iContext.Node().CountActivities(ECFActivityDestroy) == 0) |
|
236 { |
|
237 return ETrue; |
|
238 } |
|
239 else |
|
240 { |
|
241 //The messageId is cleared so the CoreNetStates::TAwaitingStop is not picking up this TStop message after this Accept has rejected it. |
|
242 //If this activity is kicked off while there is a Destroy activity, most probably the phone will crash, as there will be a SelfStop |
|
243 //which will arrive after the node has destructed. |
|
244 iContext.iMessage.ClearMessageId(); |
|
245 } |
|
246 } |
|
247 return EFalse; |
|
248 } |
|
249 |
|
250 |
224 DEFINE_SMELEMENT(TAwaitingDataMonitoringNotification, NetStateMachine::MState, IpProtoCpr::TContext) |
251 DEFINE_SMELEMENT(TAwaitingDataMonitoringNotification, NetStateMachine::MState, IpProtoCpr::TContext) |
225 TBool TAwaitingDataMonitoringNotification::Accept() |
252 TBool TAwaitingDataMonitoringNotification::Accept() |
226 { |
253 { |
227 return iContext.iMessage.IsMessage<TCFDataMonitoringNotification::TDataMonitoringNotification>(); |
254 return iContext.iMessage.IsMessage<TCFDataMonitoringNotification::TDataMonitoringNotification>(); |
228 } |
255 } |