… | |
… | |
255 | pl && pl->ob ? &pl->ob->name : "[anonymous]"); |
255 | pl && pl->ob ? &pl->ob->name : "[anonymous]"); |
256 | destroy (); |
256 | destroy (); |
257 | return false; |
257 | return false; |
258 | } |
258 | } |
259 | |
259 | |
|
|
260 | uint8_t save_byte = inbuf [pkt_len]; // rather ugly |
260 | inbuf [pkt_len] = 0; /* Terminate buffer - useful for string data */ |
261 | inbuf [pkt_len] = 0; /* temporarily terminate buffer - useful for string data */ |
261 | |
262 | |
262 | /* First, break out beginning word. There are at least |
263 | /* First, break out beginning word. There are at least |
263 | * a few commands that do not have any paremeters. If |
264 | * a few commands that do not have any paremeters. If |
264 | * we get such a command, don't worry about trying |
265 | * we get such a command, don't worry about trying |
265 | * to break it up. |
266 | * to break it up. |
… | |
… | |
289 | goto next_packet; |
290 | goto next_packet; |
290 | } |
291 | } |
291 | |
292 | |
292 | // If we get here, we didn't find a valid command. |
293 | // If we get here, we didn't find a valid command. |
293 | send_packet_printf ("drawinfo %d ERROR: command '%s' not supported.", NDI_RED | NDI_REPLY, (char *)inbuf + 2); |
294 | send_packet_printf ("drawinfo %d ERROR: command '%s' not supported.", NDI_RED | NDI_REPLY, (char *)inbuf + 2); |
|
|
295 | |
294 | next_packet: |
296 | next_packet: |
|
|
297 | inbuf [pkt_len] = save_byte; // rather ugly |
295 | skip_packet (pkt_len); |
298 | skip_packet (pkt_len); |
296 | |
299 | |
297 | // input buffer has space again |
300 | // input buffer has space again |
298 | socket_ev.poll (socket_ev.poll () | EV_READ); |
301 | socket_ev.poll (socket_ev.poll () | EV_READ); |
299 | |
302 | |