46 |
STREAM result = NULL; |
STREAM result = NULL; |
47 |
|
|
48 |
#ifdef WITH_SCARD |
#ifdef WITH_SCARD |
49 |
scard_tcp_lock(); |
scard_lock(SCARD_LOCK_TCP); |
50 |
result = scard_tcp_init(); |
result = scard_tcp_init(); |
51 |
#else |
#else |
52 |
result = &out; |
result = &out; |
61 |
result->p = result->data; |
result->p = result->data; |
62 |
result->end = result->data + result->size; |
result->end = result->data + result->size; |
63 |
#ifdef WITH_SCARD |
#ifdef WITH_SCARD |
64 |
scard_tcp_unlock(); |
scard_unlock(SCARD_LOCK_TCP); |
65 |
#endif |
#endif |
66 |
return result; |
return result; |
67 |
} |
} |
74 |
int sent, total = 0; |
int sent, total = 0; |
75 |
|
|
76 |
#ifdef WITH_SCARD |
#ifdef WITH_SCARD |
77 |
scard_tcp_lock(); |
scard_lock(SCARD_LOCK_TCP); |
78 |
#endif |
#endif |
79 |
while (total < length) |
while (total < length) |
80 |
{ |
{ |
88 |
total += sent; |
total += sent; |
89 |
} |
} |
90 |
#ifdef WITH_SCARD |
#ifdef WITH_SCARD |
91 |
scard_tcp_unlock(); |
scard_unlock(SCARD_LOCK_TCP); |
92 |
#endif |
#endif |
93 |
} |
} |
94 |
|
|