diff options
author | Nikias Bassen | 2009-08-04 00:00:32 +0200 |
---|---|---|
committer | Matt Colyer | 2009-08-04 09:05:06 -0700 |
commit | 04dc8e66956ff66f6438fd3ca151d58f528a03ea (patch) | |
tree | 41fd587645be4303eeb0e005bc6c90dcd7d26d35 /src | |
parent | 12b62b8d2d001e03d8b640afbc44d943d14f24b5 (diff) | |
download | libimobiledevice-04dc8e66956ff66f6438fd3ca151d58f528a03ea.tar.gz libimobiledevice-04dc8e66956ff66f6438fd3ca151d58f528a03ea.tar.bz2 |
Invalid check for host_id in userpref_get_host_id
On a system without a previous pairing, libiphone fails
to connect to the device:
userpref_get_host_id: Using (null) as HostID
The code checks if host_id is NULL but it needs to check
if *host_id is NULL, otherwise it won't generate a new HostID.
[#69 state:resolved]
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'src')
-rw-r--r-- | src/userpref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userpref.c b/src/userpref.c index b930693..9dd1a01 100644 --- a/src/userpref.c +++ b/src/userpref.c @@ -148,7 +148,7 @@ void userpref_get_host_id(char **host_id) g_key_file_free(key_file); g_free(config_file); - if (!host_id) { + if (!*host_id) { /* no config, generate host_id */ *host_id = userpref_generate_host_id(); userpref_set_host_id(*host_id); |