Ticket #39: truncate_avahi_names.diff

File truncate_avahi_names.diff, 0.6 kB (added by geoffp, 1 year ago)

Truncates avahi strings to fit into the 64 character max

  • src/modules/module-zeroconf-publish.c

    old new  
    257257    s->loaded.valid = s->autoload.valid = 0; 
    258258    s->service_name = pa_sprintf_malloc("%s on %s", description ? description : s->name, pa_get_host_name(hn, sizeof(hn))); 
    259259 
     260    /* truncate */ 
     261    if (strlen(s->service_name) > 63) 
     262        s->service_name[63] = '\0'; 
     263 
    260264    pa_hashmap_put(u->services, s->name, s); 
    261265 
    262266    return s;