nsPSMSocketInfo *infoObject    = (nsPSMSocketInfo *)fd->secret; PRDescIdentity          id     = PR_GetLayersIdentity(fd);  if (infoObject && id == nsSSLIOLayerIdentity) { CMInt32 errorCode = PR_FAILURE; CMT_CONTROL* control; CMSocket*    socket;
nsPSMSocketInfo *infoObject    = (nsPSMSocketInfo *)fd->secret; PRDescIdentity          id     = PR_GetLayersIdentity(fd);
nsSSLIOLayerClose(PRFileDesc *fd){  nsPSMSocketInfo *infoObject    = (nsPSMSocketInfo *)fd->secret;  PRDescIdentity          id     = PR_GetLayersIdentity(fd);     if (infoObject && id == nsSSLIOLayerIdentity)  {    CMInt32 errorCode = PR_FAILURE;    CMT_CONTROL* control;    CMSocket*    socket;        PR_Shutdown(fd, PR_SHUTDOWN_BOTH);    infoObject->GetControlPtr(&control);    infoObject->GetSocketPtr(&socket);    infoObject->SetPickledStatus();    CMT_GetSSLDataErrorCode(control, socket, &errorCode);    CMT_DestroyDataConnection(control, socket);    NS_RELEASE(infoObject);  // if someone is interested in us, the better have an addref.    fd->identity = PR_INVALID_IO_LAYER;        return (PRStatus)errorCode;  }  return PR_FAILURE;}