usbuis/usbuinotif/src/usbuinotifotgwarning.cpp
branchRCL_3
changeset 20 a15c582fbf97
parent 3 47c263f7e521
child 33 d895b6d953c9
--- a/usbuis/usbuinotif/src/usbuinotifotgwarning.cpp	Fri Feb 19 23:50:33 2010 +0200
+++ b/usbuis/usbuinotif/src/usbuinotifotgwarning.cpp	Fri Mar 12 15:48:40 2010 +0200
@@ -73,7 +73,7 @@
 void CUsbUiNotifOtgWarning::ConstructL()
     {
     CUSBUINotifierBase::ConstructL();
-    iStringIds.AppendL( R_USB_OTG_WARNING_PARTIAL_SUPPORTED);
+    iStringIds.AppendL( R_USB_OTG_WARNING_PARTIAL_SUPPORT);
     }
 
 // ----------------------------------------------------------------------------
@@ -125,16 +125,22 @@
         User::Leave( KErrInUse );
         }
 
-    iMessage = aMessage;
-    iNeedToCompleteMessage = ETrue;
-    iReplySlot = aReplySlot;
-
     // Get parameters 
     //    
     TPckgC<TInt> pckg( iNoteId );
     pckg.Set( aBuffer );
     iNoteId = pckg();
-
+    
+    FTRACE(FPrint(_L("[USBUINOTIF]\t CUsbUiNotifOtgWarning::GetParamsL iNoteId: %d"), iNoteId ));  
+    if ( iNoteId < 0 || iNoteId >= iStringIds.Count() )
+        {        
+        User::Leave( KErrArgument);        
+        }  
+    
+    iMessage = aMessage;
+    iNeedToCompleteMessage = ETrue;
+    iReplySlot = aReplySlot;
+    
     SetActive();
     iStatus = KRequestPending;
     TRequestStatus* stat = &iStatus;