Finished the auth token client port to Linux and made some minor

makefile system maintenance.
This commit is contained in:
Juan Carlos Luciani
2006-10-05 21:25:00 +00:00
parent 8db0e78d31
commit c076f68b37
20 changed files with 149 additions and 55 deletions

View File

@@ -23,8 +23,10 @@
if DEBUG
TARGET_CFG = Debug
CFLAGS += -v -w
DEFINES = -DDBG
else
TARGET_CFG = Release
DEFINES = -DNDEBUG
endif
SUBDIRS =
@@ -59,11 +61,12 @@ CFILES = ../authmech.c \
CSFILES_CSC :=
INCLUDES = -I. -I.. -I../../include
RESOURCES =
DEFINES = -fno-strict-aliasing
if LIB64
DEFINES += -D_LIB64
endif
CFLAGS += $(INCLUDES) $(DEFINES)
CFLAGS += -Wno-format-extra-args -fno-strict-aliasing $(INCLUDES) $(DEFINES)
LIBS = -lpthread -ldl -lexpat -lcurl -lidn -lssl -lcrypto -lz -lmicasa
LDFLAGS = -Bsymbolic -shared -Wl,-soname=$(MODULE_NAME).$(MODULE_EXT) -L$(ROOT)/lib/$(TARGET_CFG)

View File

@@ -140,6 +140,7 @@ Local_sem_open(const char *pathname, int oflag, ... )
// modifications from W. Richard Stevens book: UNIX Network
// Programming, Interprocess Communications (Printed in 1999).
//
// L2
//=======================================================================--
{
int i, fd, semflag, semid, save_errno;
@@ -245,6 +246,7 @@ Local_sem_wait(Local_sem_t *sem)
// modifications from W. Richard Stevens book: UNIX Network
// Programming, Interprocess Communications (Printed in 1999).
//
// L2
//=======================================================================--
{
struct sembuf op;
@@ -278,6 +280,7 @@ Local_sem_post(Local_sem_t *sem)
// modifications from W. Richard Stevens book: UNIX Network
// Programming, Interprocess Communications (Printed in 1999).
//
// L2
//=======================================================================--
{
struct sembuf op;
@@ -310,6 +313,7 @@ Local_sem_close(Local_sem_t *sem)
// modifications from W. Richard Stevens book: UNIX Network
// Programming, Interprocess Communications (Printed in 1999).
//
// L2
//=======================================================================--
{
if (sem->sem_magic != SEM_MAGIC) {
@@ -335,7 +339,7 @@ GetTickCount(void)
//
// Notes:
//
// L1
// L2
//=======================================================================--
{
struct tms tm;
@@ -349,7 +353,7 @@ GetTickCount(void)
long ticksPerSecond;
ticksPerSecond = sysconf(_SC_CLK_TCK);
DbgTrace(0, "-GetTickCount- TicksPerSec = %0X\n", ticksPerSecond);
DbgTrace(3, "-GetTickCount- TicksPerSec = %0X\n", ticksPerSecond);
g_milliSecondsPerTicks = 1000 / ticksPerSecond;
}
@@ -376,7 +380,7 @@ CreateUserMutex(
//
// Notes:
//
// L1
// L2
//=======================================================================--
{
CasaStatus retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR,
@@ -385,7 +389,7 @@ CreateUserMutex(
DbgTrace(1, "-CreateUserMutex- Start\n", 0);
// We use Posix Named Semaphores to provide this functionality. The semaphore names are
// We use Named Semaphores to provide this functionality. The semaphore names are
// linked to the user via its uid.
if (sprintf(g_userNamedSemName, "/var/lib/CASA/authtoken/semuser_%d", geteuid()) != -1)
{
@@ -428,7 +432,7 @@ AcquireUserMutex(
//
// Notes:
//
// L1
// L2
//=======================================================================--
{
DbgTrace(2, "-AcquireUserMutex- Start\n", 0);
@@ -460,7 +464,7 @@ ReleaseUserMutex(
//
// Notes:
//
// L1
// L2
//=======================================================================--
{
DbgTrace(2, "-ReleaseUserMutex- Start\n", 0);
@@ -492,7 +496,7 @@ DestroyUserMutex(
//
// Notes:
//
// L1
// L2
//=======================================================================--
{
DbgTrace(2, "-DestroyUserMutex- Start\n", 0);
@@ -620,7 +624,7 @@ NormalizeHostName(
//
// Notes:
//
// L1
// L2
//=======================================================================--
{
char *pNormalizedName = NULL;

View File

@@ -55,7 +55,7 @@ CurlWriteCallback(
//
// Notes:
//
// L0
// L2
//=======================================================================--
{
size_t dataConsumed = numDataItems;
@@ -124,7 +124,7 @@ OpenRpcSession(
//
// Notes:
//
// L0
// L2
//=======================================================================--
{
RpcSession *pSession;
@@ -263,7 +263,7 @@ CloseRpcSession(
//
// Notes:
//
// L1
// L2
//=======================================================================--
{
DbgTrace(1, "-CloseRpcSession- Start\n", 0);
@@ -307,7 +307,7 @@ InternalRpc(
//
// Notes:
//
// L1
// L2
//=======================================================================--
{
CasaStatus retStatus;
@@ -323,7 +323,7 @@ InternalRpc(
*ppResponseData = NULL;
*pResponseDataLen = 0;
// Setup the final URL using the input parameters
// Setup the URL using the input parameters
if (secure)
{
pPartialUrl = pSession->pPartialHttpsUrl;
@@ -505,7 +505,7 @@ InitializeRpc(void)
//
// Notes:
//
// L0
// L2
//=======================================================================--
{
CasaStatus retStatus;