Hi,

I have post in former articls. And now I read the source code of
readfactory.c and ifdwrapper.c and I find that the rv value is strange
in ifdwrapper.c. I am using pcsc-lite-1.2.9-beta6. Can anybody tell me
why?

    450 #ifndef PCSCLITE_STATIC_DRIVER
    451         if (rContext->dwVersion == IFD_HVERSION_1_0)
    452         {
    453                 ucValue[0] = rContext->dwSlot;
    454                 IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM,
1, ucValue);
    455                 rv = (*IFD_is_icc_present) ();
    456         }
    457         else {
    458                 rv = (*IFDH_icc_presence) (rContext->dwSlot);
    459                 DebugLogB("error code of rv1 is %d", rv);
    460         }
    461 #else
    462         if (rContext->dwVersion == IFD_HVERSION_1_0)
    463         {
    464                 ucValue[0] = rContext->dwSlot;
    465                 IFDSetCapabilities(rContext, TAG_IFD_SLOTNUM,
1, ucValue);
    466                 rv = IFD_Is_ICC_Present();
    467         }
    468         else {
    469                 rv = IFDHICCPresence(rContext->dwSlot);
    470                 DebugLogB("error code of rv is %d", rv);
    471         }
    472 #endif
    473         DebugLogA("gongying88");
    474         SYS_MutexUnLock(rContext->mMutex);
    475
    476         /*
    477          * END OF LOCKED REGION
    478          */
    479         //DebugLogA("rv is %d", rv);
    480         DebugLogA(" kkkg ");
    481         if (rv == IFD_SUCCESS || rv == IFD_ICC_PRESENT) {
    482                 dwCardStatus |= SCARD_PRESENT;
    483                 DebugLogA(" kkk ");
    484         }
    485         else {
    486                 if (rv == IFD_ICC_NOT_PRESENT) {
    487                         dwCardStatus |= SCARD_ABSENT;
    488                         DebugLogA(" kkk1 ");
    489                 }
    490                 else {
    491                         DebugLogA(" kkk2 ");
    492                         DebugLogB("error code %d",
SCARD_E_NOT_TRANSACTED);
    493                         return SCARD_E_NOT_TRANSACTED;

The output is the following:

ifdwrapper.c:447:IFDStatusICC gongying888
IFDHICCPresence  0
ifdwrapper.c:459:IFDStatusICC error code of rv1 is 612
ifdwrapper.c:473:IFDStatusICC gongying88
ifdwrapper.c:480:IFDStatusICC  kkkg
ifdwrapper.c:491:IFDStatusICC  kkk2
ifdwrapper.c:492:IFDStatusICC error code -2146435050
eventhandler.c:153:EHSpawnEventHandler gongying7 -2146435050
eventhandler.c:156:EHSpawnEventHandler Initial Check Failed on DT3500
Reader 00 00
readerfactory.c:255:RFAddReader gongying6
IFDHGetCapabilities 0, Tag=0xFAE
Segmentation fault

Why the value of rv is 612 in line 459 but -2146435050 in line 492?
There is not a statement between these two lines which modifies the
value of rv.

Thanks in advanced.

Best regards,
TowerGee

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to