rxkad_CheckPacket, /* check data packet */
rxkad_DestroyConnection,
rxkad_GetStats,
- 0, /* spare 1 */
- 0, /* spare 2 */
- 0, /* spare 3 */
+ 0, /* spare 1 */
+ 0, /* spare 2 */
+ 0, /* spare 3 */
};
extern afs_uint32 rx_MyMaxSendSize;
#include <assert.h>
pthread_mutex_t rxkad_random_mutex;
-#define LOCK_RM assert(pthread_mutex_lock(&rxkad_random_mutex)==0);
-#define UNLOCK_RM assert(pthread_mutex_unlock(&rxkad_random_mutex)==0);
+#define LOCK_RM assert(pthread_mutex_lock(&rxkad_random_mutex)==0)
+#define UNLOCK_RM assert(pthread_mutex_unlock(&rxkad_random_mutex)==0)
#else
#define LOCK_RM
#define UNLOCK_RM
struct timeval key;
gettimeofday(&key, NULL);
- LOCK_RM fc_keysched(&key, random_int32_schedule);
-UNLOCK_RM}
+ LOCK_RM;
+ fc_keysched(&key, random_int32_schedule);
+ UNLOCK_RM;
+}
static afs_int32
get_random_int32(void)
static struct timeval seed;
afs_int32 rc;
- LOCK_RM fc_ecb_encrypt(&seed, &seed, random_int32_schedule, ENCRYPT);
+ LOCK_RM;
+ fc_ecb_encrypt(&seed, &seed, random_int32_schedule, ENCRYPT);
rc = seed.tv_sec;
- UNLOCK_RM return rc;
+ UNLOCK_RM;
+ return rc;
}
/* Called with four parameters. The first is the level of encryption, as
tsp->user_ok = user_ok; /* to inform server of client id. */
init_random_int32();
- LOCK_RXKAD_STATS rxkad_stats_serverObjects++;
- UNLOCK_RXKAD_STATS return tsc;
+ LOCK_RXKAD_STATS;
+ rxkad_stats_serverObjects++;
+ UNLOCK_RXKAD_STATS;
+ return tsc;
}
/* server: called to tell if a connection authenticated properly */
rx_packetwrite(apacket, 0, challengeSize, challenge);
rx_SetDataSize(apacket, challengeSize);
sconn->tried = 1;
- LOCK_RXKAD_STATS rxkad_stats.challengesSent++;
- UNLOCK_RXKAD_STATS return 0;
+ LOCK_RXKAD_STATS;
+ rxkad_stats.challengesSent++;
+ UNLOCK_RXKAD_STATS;
+ return 0;
}
/* server: process a response to a challenge packet */
return RXKADLEVELFAIL;
sconn->level = level;
rxkad_SetLevel(aconn, sconn->level);
- LOCK_RXKAD_STATS rxkad_stats.responses[rxkad_LevelIndex(sconn->level)]++;
- UNLOCK_RXKAD_STATS
- /* now compute endpoint-specific info used for computing 16 bit checksum */
- rxkad_DeriveXORInfo(aconn, sconn->keysched, sconn->ivec,
- sconn->preSeq);
+ LOCK_RXKAD_STATS;
+ rxkad_stats.responses[rxkad_LevelIndex(sconn->level)]++;
+ UNLOCK_RXKAD_STATS;
+ /* now compute endpoint-specific info used for computing 16 bit checksum */
+ rxkad_DeriveXORInfo(aconn, sconn->keysched, sconn->ivec, sconn->preSeq);
/* otherwise things are ok */
sconn->expirationTime = end;