Author: biurrun Date: Fri Nov 27 14:01:09 2009 New Revision: 1861 Log: Move SENDTO macro to the only place it is used. Modified: trunk/pairing/common.h trunk/pairing/packet_handler.c Modified: trunk/pairing/common.h ============================================================================== --- trunk/pairing/common.h Fri Nov 27 13:53:02 2009 (r1860) +++ trunk/pairing/common.h Fri Nov 27 14:01:09 2009 (r1861) @@ -63,11 +63,6 @@ #define LINE_BREAK "======================================" -/* Use as a shorthand for the regular sendto function. */ -#define SENDTO(socket_desc, socket_addr, gen_hdr) \ - if (sendto(socket_desc, gen_hdr, sizeof(*gen_hdr), 0, (struct sockaddr*)socket_addr, sizeof(struct sockaddr_in6)) != sizeof(*gen_hdr)) \ - { perror("send"); return 0; } - /** FIXME: Probably change this to a simple printf statement. Currently * meant to stand out but also line up with the other debug messages. **/ #define USER_MSG(fmt, args...) printf("USER: " fmt "\n", ## args) Modified: trunk/pairing/packet_handler.c ============================================================================== --- trunk/pairing/packet_handler.c Fri Nov 27 13:53:02 2009 (r1860) +++ trunk/pairing/packet_handler.c Fri Nov 27 14:01:09 2009 (r1861) @@ -33,6 +33,11 @@ #define ERROR_INVALID_PWD 0 #define ERROR_NOT_CONNECTED 1 +/* Use as a shorthand for the regular sendto function. */ +#define SENDTO(socket_desc, socket_addr, gen_hdr) \ + if (sendto(socket_desc, gen_hdr, sizeof(*gen_hdr), 0, (struct sockaddr*)socket_addr, sizeof(struct sockaddr_in6)) != sizeof(*gen_hdr)) \ + { perror("send"); return 0; } + /** Creates an error structure and fills it with the information given. *