Author: biurrun Date: Fri Nov 27 10:59:10 2009 New Revision: 1845 Log: Move header contents around for a better overall structure. Modified: trunk/pairing/common.h Modified: trunk/pairing/common.h ============================================================================== --- trunk/pairing/common.h Fri Nov 27 10:55:05 2009 (r1844) +++ trunk/pairing/common.h Fri Nov 27 10:59:10 2009 (r1845) @@ -33,19 +33,6 @@ int get_expiration_time(char *expiration_duration, long int *expiration_seconds); void print_msg_info(int msg_type, int return_value); -struct global_accept_variables { - int socket_desc; -}; - -struct global_send_variables { - int socket_desc; - int nickname_given; - int force_options; -}; - -extern struct global_accept_variables global_accept; -extern struct global_send_variables global_send; - // Constants #define LENGTH_ERROR_STRING 128 #define LENGTH_PASSWORD 50 @@ -60,10 +47,6 @@ #define FILE_SERVER_CONFIG "relay_config.cfg" #define FILE_USER_CONFIG "user_config.cfg" -// Debug message macros -#define CHECK_FOR_NULL_HDR(hdr) \ - if (hdr == NULL) { DEBUG("Header could not be created. Exiting."); return 0; } - // If you add a new message type, update print_msg_info() in common.c #define MSG_PASSWORD 0 #define MSG_ACK_1 1 @@ -94,6 +77,9 @@ #define DEBUG(fmt, args...) \ printf("Debug: " fmt "\n", ## args) +#define CHECK_FOR_NULL_HDR(hdr) \ + if (hdr == NULL) { DEBUG("Header could not be created. Exiting."); return 0; } + #define DEBUG_EMPTY do { } while(0) @@ -118,6 +104,19 @@ #endif +struct global_accept_variables { + int socket_desc; +}; + +struct global_send_variables { + int socket_desc; + int nickname_given; + int force_options; +}; + +extern struct global_accept_variables global_accept; +extern struct global_send_variables global_send; + /* Structure to hold a password */ typedef struct header_password { uint8_t password[LENGTH_PASSWORD];