diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-11-07 20:48:46 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-11-07 20:48:46 +0000 |
commit | b55923a8d33a1c4ed2f892a0da36c9c679e7d828 (patch) | |
tree | ce438dbabea11c10a531afa540ef120948014f5d /polyp/util.c | |
parent | 5844a33f0be1af942ee33feae38b9d46169fd61c (diff) |
* Look for M4 in configure.ac
* Share auth cookies in module-tunnel.c, module-x11-publish.c and native-protocol.c
* disable TCP_NODELAY
* publish auth cookie in module-x11-publish
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@274 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/util.c')
-rw-r--r-- | polyp/util.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/polyp/util.c b/polyp/util.c index 6e97bae4..97b3a26b 100644 --- a/polyp/util.c +++ b/polyp/util.c @@ -715,3 +715,20 @@ FILE *pa_open_config_file(const char *global, const char *local, const char *env return fopen(global, "r"); } +/* Format the specified data as a hexademical string */ +char *pa_hexstr(const uint8_t* d, size_t dlength, char *s, size_t slength) { + size_t i = 0, j = 0; + const char hex[] = "0123456789abcdef"; + assert(d && s && slength > 0); + + while (i < dlength && j+3 <= slength) { + s[j++] = hex[*d >> 4]; + s[j++] = hex[*d & 0xF]; + + d++; + i++; + } + + s[j < slength ? j : slength] = 0; + return s; +} |