File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,14 @@ class UdpNameSync : public Usermod {
3636 byte udpOut[WLED_MAX_SEGNAME_LEN + 2 ];
3737 udpOut[0 ] = 2 ; // 0: wled notifier protocol, 1: warls protocol, 2 is free
3838
39- if (strlen (segmentName) && !mainseg.name ) { // name is back to null
40- notifierUdp.beginPacket (broadcastIp, udpPort);
41- strcpy (segmentName," " );
42- DEBUG_PRINTLN (F (" UdpNameSync: sending Null name" ));
43- notifierUdp.write ( udpOut , 2 );
44- notifierUdp.endPacket ();
45- return ;
39+ if (strlen (segmentName) && !mainseg.name ) { // name cleared
40+ notifierUdp.beginPacket (broadcastIp, udpPort);
41+ segmentName[0 ] = ' \0 ' ;
42+ DEBUG_PRINTLN (F (" UdpNameSync: sending empty name" ));
43+ udpOut[1 ] = 0 ; // explicit empty string
44+ notifierUdp.write (udpOut, 2 );
45+ notifierUdp.endPacket ();
46+ return ;
4647 }
4748
4849 const char * curName = mainseg.name ? mainseg.name : " " ;
You can’t perform that action at this time.
0 commit comments