Ticket #40: name_collision_no_seperator.patch

File name_collision_no_seperator.patch, 0.6 kB (added by anonymous, 6 years ago)
  • avahi-common/alternative.c

    diff -urN avahi-0.6.10.orig/avahi-common/alternative.c avahi-0.6.10/avahi-common/alternative.c
    old new  
    3737 
    3838    assert(s); 
    3939 
    40     e = s; 
    41      
    4240    for (p = s; *p; p++) 
    43         if (!isdigit(*p)) 
     41        if ((*p == '-') && isdigit(p+1)) 
    4442            e = p+1; 
    4543 
    4644    if (*e) { 
     
    5351        avahi_free(c); 
    5452         
    5553    } else 
    56         r = avahi_strdup_printf("%s2", s); 
     54        r = avahi_strdup_printf("%s-2", s); 
    5755     
    5856    return r; 
    5957}