… | |
… | |
493 | { |
493 | { |
494 | LOG (logBacktrace | llevError, "send_msg(%d,%p,%p) called with NULL msg or type.\n", color, type, msg); |
494 | LOG (logBacktrace | llevError, "send_msg(%d,%p,%p) called with NULL msg or type.\n", color, type, msg); |
495 | return; |
495 | return; |
496 | } |
496 | } |
497 | |
497 | |
|
|
498 | int len = strlen (msg); |
|
|
499 | |
498 | if (msg_is_special (msg) || (type [0] == 'c' && type [1] == '/')) |
500 | if (msg_is_special (msg) || (type [0] == 'c' && type [1] == '/') || len > (MAXSOCKBUF - 128)) |
499 | cfperl_send_msg (this, color, type, msg); |
501 | cfperl_send_msg (this, color, type, msg); |
500 | else if (can_msg) |
502 | else if (can_msg) |
501 | send_packet_printf ("msg %d %s %s", color & NDI_CLIENT_MASK, type, msg); |
503 | send_packet_printf ("msg %d %s %s", color & NDI_CLIENT_MASK, type, msg); |
502 | else if (color < 0) |
504 | else if (color < 0) |
503 | return; // client cannot handle this |
505 | return; // client cannot handle this |