usbuis/usbuinotif/src/usbuinotifotgerror.cpp
branchRCL_3
changeset 65 a44cdf4b4bf0
parent 8 7e15987c4500
child 21 ff9df6630274
--- a/usbuis/usbuinotif/src/usbuinotifotgerror.cpp	Fri Feb 19 23:50:32 2010 +0200
+++ b/usbuis/usbuinotif/src/usbuinotifotgerror.cpp	Fri Mar 12 15:48:40 2010 +0200
@@ -108,22 +108,29 @@
         {
         User::Leave( KErrInUse );
         }
-
-    iMessage = aMessage;
-    iNeedToCompleteMessage = ETrue;
-    iReplySlot = aReplySlot;
-
+        
     // Get parameters 
     //
-    iErrorId = 0;
+    
     TPckgC<TInt> pckg( iErrorId );
     pckg.Set( aBuffer );
     iErrorId = pckg();
-
+    
+    FTRACE(FPrint(_L("[USBUINOTIF]\t CUsbUiNotifOtgError::GetParamsL iErrorId: %d"), iErrorId ));  
+    if ( iErrorId < 0 || iErrorId >= iStringIds.Count() )
+        {        
+        User::Leave( KErrArgument);        
+        }    
+        
+    iMessage = aMessage;
+    iNeedToCompleteMessage = ETrue;
+    iReplySlot = aReplySlot;  
+	  
     SetActive();
     iStatus = KRequestPending;
     TRequestStatus* stat = &iStatus;
-    User::RequestComplete( stat, KErrNone );
+    User::RequestComplete( stat, KErrNone );    
+        
     FLOG(_L("[USBUINOTIF]\t CUsbUiNotifOtgError::GetParamsL() completed"));
     }