Fix for closeSession with invalid session ID

Issue: If user trying to closeSession with invalid session ID, response
is incorrect and getting as "Unspecified error" (0xff).

Fix: Handle invalid session ID/Handle using separate try cache blocks
and correct the response. i.e. Return "invalid Session ID in request"
(0x87) if user requests to close invalid session ID. Return "invalid
Session Handle in request" (0x88) if user requests to close invalid
session Handle.

Tested:
Verified using RMCPP command.
Command : ipmitool -I lanplus -H <BMC-IP> -U <Username> -P <pwd> -C 17
          raw 0x06 0x3C 0x87 0x00 0xEC 0x8E //Close session command
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
          cmd=0x3c rsp=0x87): Unknown (0x87)
Command : ipmitool -I lanplus -H <BMC-IP> -U <Username> -P <pwd> -C 17
          raw 0x06 0x3C 0x0 0x0 0x0 0x0 0x80
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
          cmd=0x3c rsp=0x88): Unknown (0x88)

Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I97f57c7cc48efb17e561985b1f4964a8a15bf30e
1 file changed