Replace bit mask hex values with shifts

This commit is contained in:
Dmitry Podgorny
2016-04-26 13:01:22 +00:00
parent 4c0c12343f
commit 211748e65a
2 changed files with 9 additions and 8 deletions

View File

@@ -133,10 +133,10 @@ struct _xmpp_handlist_t {
#define MAX_DOMAIN_LEN 256
#define SASL_MASK_PLAIN 0x01
#define SASL_MASK_DIGESTMD5 0x02
#define SASL_MASK_ANONYMOUS 0x04
#define SASL_MASK_SCRAMSHA1 0x08
#define SASL_MASK_PLAIN (1 << 0)
#define SASL_MASK_DIGESTMD5 (1 << 1)
#define SASL_MASK_ANONYMOUS (1 << 2)
#define SASL_MASK_SCRAMSHA1 (1 << 3)
enum {
XMPP_PORT_CLIENT = 5222,

View File

@@ -158,6 +158,11 @@ xmpp_log_t *xmpp_get_default_logger(xmpp_log_level_t level);
typedef struct _xmpp_conn_t xmpp_conn_t;
typedef struct _xmpp_stanza_t xmpp_stanza_t;
/* connection flags */
#define XMPP_CONN_FLAG_DISABLE_TLS (1UL << 0)
#define XMPP_CONN_FLAG_MANDATORY_TLS (1UL << 1)
#define XMPP_CONN_FLAG_LEGACY_SSL (1UL << 2)
/* connect callback */
typedef enum {
XMPP_CONN_CONNECT,
@@ -192,10 +197,6 @@ typedef enum {
XMPP_SE_XML_NOT_WELL_FORMED
} xmpp_error_type_t;
#define XMPP_CONN_FLAG_DISABLE_TLS 0x0001
#define XMPP_CONN_FLAG_MANDATORY_TLS 0x0002
#define XMPP_CONN_FLAG_LEGACY_SSL 0x0004
typedef struct {
xmpp_error_type_t type;
char *text;