Changeset 1282 for branches/monitor-improvement/csctapi/ct_slot.c
- Timestamp:
- 01/18/10 22:58:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/monitor-improvement/csctapi/ct_slot.c
r1268 r1282 121 121 unsigned buffer_len = 0; 122 122 123 /* Initiaice ICC */ 124 slot->icc = ICC_Async_New (); 125 126 if (slot->icc == NULL) 127 return ERR_MEMORY; 128 129 if (ICC_Async_Init (slot->icc) != ICC_ASYNC_OK) 130 { 131 ICC_Async_Delete (slot->icc); 132 133 slot->icc = NULL; 134 slot->icc_type = CT_SLOT_NULL; 123 if (ICC_Async_Init () != ICC_ASYNC_OK) 124 { 135 125 return ERR_TRANS; 136 126 … … 148 138 if (slot->icc_type == CT_SLOT_ICC_ASYNC) 149 139 { 150 pps = PPS_New( (ICC_Async *) slot->icc);140 pps = PPS_New(); 151 141 152 142 if (pps == NULL) 153 143 { 154 ICC_Async_Close ((ICC_Async *) slot->icc); 155 ICC_Async_Delete ((ICC_Async *) slot->icc); 144 ICC_Async_Close (); 156 145 157 146 slot->icc = NULL; … … 169 158 PPS_Delete (pps); 170 159 171 ICC_Async_Close ((ICC_Async *) slot->icc); 172 ICC_Async_Delete ((ICC_Async *) slot->icc); 160 ICC_Async_Close (); 173 161 174 162 slot->icc = NULL; … … 222 210 if (slot->icc_type == CT_SLOT_ICC_ASYNC) 223 211 { 224 if (ICC_Async_Close ((ICC_Async *) slot->icc) != ICC_ASYNC_OK) 225 ret = ERR_TRANS; 226 227 ICC_Async_Delete ((ICC_Async *) slot->icc); 212 if (ICC_Async_Close () != ICC_ASYNC_OK) 213 ret = ERR_TRANS; 228 214 } 229 215 … … 241 227 if (slot->protocol_type == CT_SLOT_PROTOCOL_T0) /* T=0 protocol ICC */ 242 228 { 243 if (Protocol_T0_Command ( (Protocol_T0 *) slot->protocol,cmd, rsp) != PROTOCOL_T0_OK)229 if (Protocol_T0_Command ( cmd, rsp) != PROTOCOL_T0_OK) 244 230 ret = ERR_TRANS; 245 231 else … … 255 241 else if (slot->protocol_type == CT_SLOT_PROTOCOL_T14) /* T=14 protocol ICC */ 256 242 { 257 if (Protocol_T14_Command ( (Protocol_T14 *) slot->protocol,cmd, rsp) != PROTOCOL_T14_OK)243 if (Protocol_T14_Command (cmd, rsp) != PROTOCOL_T14_OK) 258 244 ret = ERR_TRANS; 259 245 else … … 290 276 { 291 277 if (slot->icc_type == CT_SLOT_ICC_ASYNC) 292 return ((void *) ICC_Async_GetAtr((ICC_Async *) slot->icc)); 278 return ((void *) atr ); 279 //return ((void *) ICC_Async_GetAtr((ICC_Async *) slot->icc)); 293 280 294 281 return NULL; … … 338 325 if (slot->icc_type == CT_SLOT_ICC_ASYNC) 339 326 { 340 if (ICC_Async_Close ((ICC_Async *) slot->icc) != ICC_ASYNC_OK) 341 ret = ERR_TRANS; 342 343 ICC_Async_Delete ((ICC_Async *) slot->icc); 327 if (ICC_Async_Close () != ICC_ASYNC_OK) 328 ret = ERR_TRANS; 344 329 } 345 330
Note:
See TracChangeset
for help on using the changeset viewer.