~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to debian/patches/unquote-hostname.patch

  • Committer: Package Import Robot
  • Author(s): Simon Fels
  • Date: 2015-08-07 18:00:55 UTC
  • Revision ID: package-import@ubuntu.com-20150807180055-8mx5nrm4mgnj9dl4
Tags: 4.101-0ubuntu29
* debian/patches/unquote-hostname.patch:
  - As hostname is quoted in /etc/machine-info we have to unquote it before
    starting to use it or all remote device will see the quotes in our name.
    (LP: #1482688)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: bt-fixes-2/plugins/adaptername.c
 
2
===================================================================
 
3
--- bt-fixes-2.orig/plugins/adaptername.c
 
4
+++ bt-fixes-2/plugins/adaptername.c
 
5
@@ -77,7 +77,7 @@ static char *read_pretty_host_name(void)
 
6
        ret = NULL;
 
7
        for (i = 0; lines[i] != NULL; i++) {
 
8
                if (g_str_has_prefix(lines[i], "PRETTY_HOSTNAME=")) {
 
9
-                       ret = g_strdup(lines[i] + strlen("PRETTY_HOSTNAME="));
 
10
+                       ret = g_shell_unquote(lines[i] + strlen("PRETTY_HOSTNAME="), NULL);
 
11
                        break;
 
12
                }
 
13
        }