]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Clean out dead code from ccapi
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Tue, 21 Aug 2012 15:45:49 +0000 (11:45 -0400)
committerTom Yu <tlyu@mit.edu>
Wed, 29 Aug 2012 23:17:18 +0000 (19:17 -0400)
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
(cherry picked from commit 602a3572b5c79a9ecacc1145e0a611e4f5198ebe)

ticket: 7237
version_fixed: 1.10.4
status: resolved

src/ccapi/common/win/tls.c
src/ccapi/common/win/tls.h

index 5743ddb203a1b2c1220798dffb4819530f50a473..6c13d5a981517079782911d3a103542bc2330cfa 100644 (file)
 
 #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
index 181537f6f5b56cabaecb85dac91d435ab34a7c9d..bd2bb9e1e0d4db80ae8eeb0d4c0aa0b9076a1d07 100644 (file)
@@ -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