usbuis/usbuinotif/src/usbuinotifotgwarning.cpp
changeset 25 8c311f9acc5e
parent 3 47c263f7e521
child 52 831068540b07
child 63 ef2686f7597e
--- a/usbuis/usbuinotif/src/usbuinotifotgwarning.cpp	Tue Feb 02 00:52:37 2010 +0200
+++ b/usbuis/usbuinotif/src/usbuinotifotgwarning.cpp	Fri Mar 19 09:48:52 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);
     }
 
 // ----------------------------------------------------------------------------
@@ -123,18 +123,24 @@
     if (iNote || iReplySlot != 0 || iNeedToCompleteMessage)
         {
         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;