From 20fcf8e6ddd54370da3d30c2f73b0604a0411a12 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 27 Jul 2010 14:12:07 +0000 Subject: [PATCH] * Changed some instances of 'struct CitContext *CCC = CC;' to 'struct CitContext *CCC = MyContext();' in order to demonstrate one way in which we might eliminate the CC macro --- citadel/clientsocket.c | 8 ++++---- citadel/context.c | 2 +- citadel/msgbase.c | 2 +- citadel/sysdep.c | 2 +- citadel/user_ops.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/citadel/clientsocket.c b/citadel/clientsocket.c index 29f5e6236..7220709ba 100644 --- a/citadel/clientsocket.c +++ b/citadel/clientsocket.c @@ -152,7 +152,7 @@ int socket_read_blob(int *Socket, int bytes, int timeout) { - CitContext *CCC=CC; + CitContext *CCC = MyContext(); const char *Error; int retval = 0; @@ -177,7 +177,7 @@ int socket_read_blob(int *Socket, int sock_read_to(int *sock, char *buf, int bytes, int timeout, int keep_reading_until_full) { - CitContext *CCC=CC; + CitContext *CCC = MyContext(); int rc; FlushStrBuf(CCC->MigrateBuf); @@ -206,7 +206,7 @@ int sock_read_to(int *sock, char *buf, int bytes, int timeout, int keep_reading_ int CtdlSockGetLine(int *sock, StrBuf *Target) { - CitContext *CCC=CC; + CitContext *CCC = MyContext(); const char *Error; int rc; @@ -235,7 +235,7 @@ int CtdlSockGetLine(int *sock, StrBuf *Target) int sock_getln(int *sock, char *buf, int bufsize) { int i, retval; - CitContext *CCC=CC; + CitContext *CCC = MyContext(); const char *pCh; FlushStrBuf(CCC->sMigrateBuf); diff --git a/citadel/context.c b/citadel/context.c index 06615b7e2..fb4a5dd11 100644 --- a/citadel/context.c +++ b/citadel/context.c @@ -461,7 +461,7 @@ void CtdlFillSystemContext(CitContext *context, char *name) */ void CtdlClearSystemContext(void) { - CitContext *CCC = CC; + CitContext *CCC = MyContext(); memset(CCC, 0, sizeof(CitContext)); citthread_setspecific(MyConKey, NULL); diff --git a/citadel/msgbase.c b/citadel/msgbase.c index fc81c03bd..f1aa9da92 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -2857,7 +2857,7 @@ long CtdlSubmitMsg(struct CtdlMessage *msg, /* message to save */ struct addresses_to_be_filed *aptr = NULL; StrBuf *saved_rfc822_version = NULL; int qualified_for_journaling = 0; - CitContext *CCC = CC; /* CachedCitContext - performance boost */ + CitContext *CCC = MyContext(); char bounce_to[1024] = ""; size_t tmp = 0; int rv = 0; diff --git a/citadel/sysdep.c b/citadel/sysdep.c index 9dce3a3ae..7da7aa547 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -120,7 +120,7 @@ void vCtdlLogPrintf(enum LogLevel loglevel, const char *format, va_list arg_ptr) struct timeval tv; struct tm tim; time_t unixtime; - CitContext *CCC = CC; + CitContext *CCC = MyContext(); ThreadTSD *cTSD = CTP; CtdlThreadNode *node = NULL; long lwpid = 0; diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 95ec1e207..6e15afb8f 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -774,7 +774,7 @@ void logout(void) void CtdlUserLogout(void) { - CitContext *CCC = CC; /* CachedCitContext - performance boost */ + CitContext *CCC = MyContext(); /* * If there is a download in progress, abort it. */ -- 2.30.2