about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorDmitry Podgorny <pasis.ua@gmail.com>2013-01-12 23:40:21 +0200
committerDmitry Podgorny <pasis.ua@gmail.com>2013-01-12 23:40:21 +0200
commit9660f402ad39a525e66fc5d7e203fadd30df28ee (patch)
tree1d592e0c63d11106ce5bf8ed82d32d0d3289831d /src
parent9121cbe29578539f489db3b1642aa366b2cfca14 (diff)
downloadprofani-tty-9660f402ad39a525e66fc5d7e203fadd30df28ee.tar.gz
added JABBER_PRIORITY_* macros
Diffstat (limited to 'src')
-rw-r--r--src/jabber.c2
-rw-r--r--src/jabber.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/jabber.c b/src/jabber.c
index 7709c405..8579cec3 100644
--- a/src/jabber.c
+++ b/src/jabber.c
@@ -364,7 +364,7 @@ jabber_update_presence(jabber_presence_t status, const char * const msg,
         return;
 
     pri = prefs_get_priority();
-    if (pri < -128 || pri > 127)
+    if (pri < JABBER_PRIORITY_MIN || pri > JABBER_PRIORITY_MAX)
         pri = 0;
 
     jabber_conn.presence = status;
diff --git a/src/jabber.h b/src/jabber.h
index 897ca242..326328cc 100644
--- a/src/jabber.h
+++ b/src/jabber.h
@@ -49,6 +49,9 @@ typedef enum {
     PRESENCE_UNSUBSCRIBED
 } jabber_subscr_t;
 
+#define JABBER_PRIORITY_MIN -128
+#define JABBER_PRIORITY_MAX 127
+
 void jabber_init(const int disable_tls);
 jabber_conn_status_t jabber_connect(const char * const jid,
     const char * const passwd, const char * const altdomain);