diff -r 7068aba64af5 -r a15c582fbf97 usbuis/usbuinotif/src/usbuinotifotgerror.cpp --- a/usbuis/usbuinotif/src/usbuinotifotgerror.cpp Fri Feb 19 23:50:33 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 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")); }