mcabber/mcabber/xmpp.c
changeset 2075 f52b47f29ca0
parent 2044 c00b919cf4ac
child 2085 88b6e9707e02
equal deleted inserted replaced
2074:e04b6dfbb054 2075:f52b47f29ca0
  1488     g_free(bjid);
  1488     g_free(bjid);
  1489     return LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS;
  1489     return LM_HANDLER_RESULT_ALLOW_MORE_HANDLERS;
  1490   }
  1490   }
  1491 
  1491 
  1492   p = lm_message_node_get_child_value(m->node, "priority");
  1492   p = lm_message_node_get_child_value(m->node, "priority");
  1493   if (p && *p) bpprio = (gchar)atoi(p);
  1493   if (p && *p) {
  1494   else         bpprio = 0;
  1494     int rawprio = atoi(p);
       
  1495     if (rawprio > 127)
       
  1496       bpprio = 127;
       
  1497     else if (rawprio < -128)
       
  1498       bpprio = -128;
       
  1499     else
       
  1500       bpprio = rawprio;
       
  1501   } else {
       
  1502     bpprio = 0;
       
  1503   }
  1495 
  1504 
  1496   ust = available;
  1505   ust = available;
  1497 
  1506 
  1498   p = lm_message_node_get_child_value(m->node, "show");
  1507   p = lm_message_node_get_child_value(m->node, "show");
  1499   if (p) {
  1508   if (p) {