Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 211861 Details for
Bug 313141
Module-zeroconf fails to advertise when sink name > 64 bytes
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to fix avahi names that are > 64 bytes
pulseaudio-0.9.6-truncate-avahi-names.patch (text/plain), 2.45 KB, created by
Jonathan Dieter
on 2007-09-30 16:35:57 UTC
(
hide
)
Description:
Patch to fix avahi names that are > 64 bytes
Filename:
MIME Type:
Creator:
Jonathan Dieter
Created:
2007-09-30 16:35:57 UTC
Size:
2.45 KB
patch
obsolete
>diff -ur pulseaudio-0.9.6b/src/modules/module-zeroconf-publish.c pulseaudio-0.9.6a/src/modules/module-zeroconf-publish.c >--- pulseaudio-0.9.6b/src/modules/module-zeroconf-publish.c 2007-05-13 02:21:39.000000000 +0300 >+++ pulseaudio-0.9.6a/src/modules/module-zeroconf-publish.c 2007-09-30 18:50:46.000000000 +0300 >@@ -34,6 +34,7 @@ > #include <avahi-client/client.h> > #include <avahi-client/publish.h> > #include <avahi-common/alternative.h> >+#include <avahi-common/domain.h> > #include <avahi-common/error.h> > > #include <pulse/xmalloc.h> >@@ -255,7 +256,7 @@ > s->published = UNPUBLISHED; > s->name = pa_xstrdup(name); > s->loaded.valid = s->autoload.valid = 0; >- s->service_name = pa_sprintf_malloc("%s on %s", description ? description : s->name, pa_get_host_name(hn, sizeof(hn))); >+ s->service_name = pa_truncate_utf8(pa_sprintf_malloc("%s on %s", description ? description : s->name, pa_get_host_name(hn, sizeof(hn))), AVAHI_LABEL_MAX-1); > > pa_hashmap_put(u->services, s->name, s); > >@@ -622,7 +623,7 @@ > > u->main_entry_group = NULL; > >- u->service_name = pa_xstrdup(pa_get_host_name(hn, sizeof(hn))); >+ u->service_name = pa_truncate_utf8(pa_xstrdup(pa_get_host_name(hn, sizeof(hn))), AVAHI_LABEL_MAX-1); > > if (!(u->client = avahi_client_new(u->avahi_poll, AVAHI_CLIENT_NO_FAIL, client_callback, u, &error))) { > pa_log("pa_avahi_client_new() failed: %s", avahi_strerror(error)); >diff -ur pulseaudio-0.9.6b/src/pulsecore/core-util.c pulseaudio-0.9.6a/src/pulsecore/core-util.c >--- pulseaudio-0.9.6b/src/pulsecore/core-util.c 2007-05-25 23:35:33.000000000 +0300 >+++ pulseaudio-0.9.6a/src/pulsecore/core-util.c 2007-09-30 18:34:30.000000000 +0300 >@@ -1198,3 +1198,20 @@ > > return 0; > } >+ >+/* Truncate the specified string, but guarantee that the string >+ * * returned still validates as UTF8 */ >+char *pa_truncate_utf8(char *c, size_t l) { >+ assert(c); >+ assert(pa_utf8_valid(c)); >+ >+ if (strlen(c) <= l) >+ return c; >+ >+ c[l] = 0; >+ >+ while (l > 0 && !pa_utf8_valid(c)) >+ c[--l] = 0; >+ >+ return c; >+} >diff -ur pulseaudio-0.9.6b/src/pulsecore/core-util.h pulseaudio-0.9.6a/src/pulsecore/core-util.h >--- pulseaudio-0.9.6b/src/pulsecore/core-util.h 2007-05-13 02:21:38.000000000 +0300 >+++ pulseaudio-0.9.6a/src/pulsecore/core-util.h 2007-09-30 18:34:55.000000000 +0300 >@@ -91,5 +91,6 @@ > > int pa_atoi(const char *s, int32_t *ret_i); > int pa_atou(const char *s, uint32_t *ret_u); >+char *pa_truncate_utf8(char *c, size_t l); > > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 313141
: 211861 |
211871