diff options
author | Kevin Wasserman <kevin.wasserman@painless-security.com> | 2012-08-21 11:45:49 -0400 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2012-08-29 19:17:18 -0400 |
commit | 8f08bea36cc7ebb6c726d714eb626fb783f64cb8 (patch) | |
tree | b77fa2117a85b3595a386c5c534c4e830d7ab451 | |
parent | 3a94b5c9367730554eccd14047df5be2d307f14c (diff) | |
download | krb5-8f08bea36cc7ebb6c726d714eb626fb783f64cb8.zip krb5-8f08bea36cc7ebb6c726d714eb626fb783f64cb8.tar.gz krb5-8f08bea36cc7ebb6c726d714eb626fb783f64cb8.tar.bz2 |
Clean out dead code from ccapi
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
(cherry picked from commit 602a3572b5c79a9ecacc1145e0a611e4f5198ebe)
ticket: 7237
version_fixed: 1.10.4
status: resolved
-rw-r--r-- | src/ccapi/common/win/tls.c | 35 | ||||
-rw-r--r-- | src/ccapi/common/win/tls.h | 4 |
2 files changed, 0 insertions, 39 deletions
diff --git a/src/ccapi/common/win/tls.c b/src/ccapi/common/win/tls.c index 5743ddb..6c13d5a 100644 --- a/src/ccapi/common/win/tls.c +++ b/src/ccapi/common/win/tls.c @@ -29,20 +29,6 @@ #include "tls.h" -struct tspdata* new_tspdata(char* uuid, time_t sst) { - struct tspdata* p = (struct tspdata*)malloc(sizeof(struct tspdata)); - if (p) { - memset(p, 0, sizeof(struct tspdata)); - p->_sst = sst; - if (uuid) {strncpy(p->_uuid, uuid, UUID_SIZE-1);} - } - return p; - } - -void delete_tspdata(struct tspdata* p) { - if (p) free(p); - } - void tspdata_setUUID(struct tspdata* p, unsigned char __RPC_FAR* uuidString) { strncpy(p->_uuid, uuidString, UUID_SIZE-1); }; @@ -74,27 +60,6 @@ char* tspdata_getUUID (const struct tspdata* p) {return p->_ RPC_ASYNC_STATE* tspdata_getRpcAState (const struct tspdata* p) {return p->_rpcState;} -BOOL WINAPI PutTspData(DWORD dwTlsIndex, struct tspdata* dw) { - LPVOID lpvData; - struct tspdata** pData; // The stored memory pointer - - // Retrieve a data pointer for the current thread: - lpvData = TlsGetValue(dwTlsIndex); - - // If NULL, allocate memory for the TLS slot for this thread: - if (lpvData == NULL) { - lpvData = (LPVOID) LocalAlloc(LPTR, sizeof(struct tspdata)); - if (lpvData == NULL) return FALSE; - if (!TlsSetValue(dwTlsIndex, lpvData)) return FALSE; - } - - pData = (struct tspdata**) lpvData; // Cast to my data type. - // In this example, it is only a pointer to a DWORD - // but it can be a structure pointer to contain more complicated data. - - (*pData) = dw; - return TRUE; - } BOOL WINAPI GetTspData(DWORD dwTlsIndex, struct tspdata** pdw) { struct tspdata* pData; // The stored memory pointer diff --git a/src/ccapi/common/win/tls.h b/src/ccapi/common/win/tls.h index 181537f..bd2bb9e 100644 --- a/src/ccapi/common/win/tls.h +++ b/src/ccapi/common/win/tls.h @@ -50,9 +50,6 @@ struct tspdata { char _uuid[UUID_SIZE]; }; -struct tspdata* new_tspdata (char* uuid, time_t sst); -void delete_tspdata (struct tspdata* p); - void tspdata_setListening (struct tspdata* p, BOOL b); void tspdata_setConnected (struct tspdata* p, BOOL b); void tspdata_setReplyEvent(struct tspdata* p, HANDLE h); @@ -69,7 +66,6 @@ time_t tspdata_getSST (const struct tspdata* p); k5_ipc_stream tspdata_getStream (const struct tspdata* p); char* tspdata_getUUID (const struct tspdata* p); -BOOL WINAPI PutTspData(DWORD tlsIndex, struct tspdata* dw); BOOL WINAPI GetTspData(DWORD tlsIndex, struct tspdata** pdw); #endif _tls_h |