Mercurial > hg > quicktun
diff src/proto.nacltai.c @ 30:6f0e6b7dc088
Fixed build script to support multiple abis on one machine, bugfix in code, minor improvements
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Thu, 04 Aug 2011 18:17:06 +0200 |
parents | 5ba185ca7102 |
children | 51c6d2fc712f |
line wrap: on
line diff
--- a/src/proto.nacltai.c Sat Apr 09 23:34:06 2011 +0200 +++ b/src/proto.nacltai.c Thu Aug 04 18:17:06 2011 +0200 @@ -118,7 +118,7 @@ } static int encode(struct qtsession* sess, char* raw, char* enc, int len) { - if (debug) fprintf(stderr, "Encoding packet of %d bytes from %d to %d\n", len, (int)raw, (int)enc); + if (debug) fprintf(stderr, "Encoding packet of %d bytes from %p to %p\n", len, raw, enc); struct qt_proto_data_nacltai* d = (struct qt_proto_data_nacltai*)sess->protocol_data; memset(raw, 0, crypto_box_curve25519xsalsa20poly1305_ZEROBYTES); taia_now(&d->cdtaie); @@ -126,12 +126,12 @@ if (crypto_box_curve25519xsalsa20poly1305_afternm(enc, raw, len + crypto_box_curve25519xsalsa20poly1305_ZEROBYTES, d->cenonce, d->cbefore)) return errorexit("Encryption failed"); memcpy((void*)(enc + crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES - noncelength), d->cenonce + nonceoffset, noncelength); len += overhead; - if (debug) fprintf(stderr, "Encoded packet of %d bytes from %d to %d\n", len, (int)raw, (int)enc); + if (debug) fprintf(stderr, "Encoded packet of %d bytes from %p to %p\n", len, raw, enc); return len; } static int decode(struct qtsession* sess, char* enc, char* raw, int len) { - if (debug) fprintf(stderr, "Decoding packet of %d bytes from %d to %d\n", len, (int)enc, (int)raw); + if (debug) fprintf(stderr, "Decoding packet of %d bytes from %p to %p\n", len, enc, raw); struct qt_proto_data_nacltai* d = (struct qt_proto_data_nacltai*)sess->protocol_data; struct taia cdtaic; int i; @@ -152,7 +152,7 @@ return 0; } d->cdtaip = cdtaic; - if (debug) fprintf(stderr, "Decoded packet of %d bytes from %d to %d\n", len, (int)enc, (int)raw); + if (debug) fprintf(stderr, "Decoded packet of %d bytes from %p to %p\n", len, enc, raw); return len; }