Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 1a904bf1 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

QUEUE: Display events with NULL attr in a better way

parent 241e4606
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!141Improve MPD compatibility
......@@ -822,13 +822,17 @@ lkt_client_auth(struct lkt_state *srv, size_t c, bool set)
static inline void
handle_queue_events(struct lkt_state *srv)
{
#define __CASE(type, func) \
case lkt_event_ ## type: \
LOG_DEBUG("EVENT", "Got event " #type " with attr (int: %d, ptr %0*p)", \
evt.attr, sizeof(size_t) * CHAR_BIT / 4, evt.attr); \
func; \
#define __CASE(type, func) \
case lkt_event_ ## type: \
if (evt.attr != NULL) { \
LOG_DEBUG("EVENT", "Got event " #type " with attr (int: %d, ptr %0*p)", \
evt.attr, sizeof(size_t) * CHAR_BIT / 4, evt.attr); \
} else { \
LOG_DEBUG("EVENT", "Got event " #type " with NULL attr"); \
} \
func; \
break;
#define __ATTR_IS_STATE(state, func) { \
#define __ATTR_IS_STATE(state, func) { \
if ((__LKT_PLAY_ ## state) == (size_t) evt.attr) { func; }}
lkt_event evt;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter