summaryrefslogtreecommitdiffstats
path: root/serial/storage.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-08-22 15:01:52 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-08-22 15:01:52 +0000
commit26c787542c3949e2b64564ce84c3f52761b275d1 (patch)
tree3a9915553f2d1a6edd73f9a7fdd8082b73f82bf8 /serial/storage.c
parent9a2408e2e45e5b47c3f7019246d9260d7f864f4f (diff)
serial: added proxy for unix sockets
Diffstat (limited to 'serial/storage.c')
-rw-r--r--serial/storage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/serial/storage.c b/serial/storage.c
index 641ca1e8..8b66354f 100644
--- a/serial/storage.c
+++ b/serial/storage.c
@@ -121,9 +121,13 @@ int proxy_store(bdaddr_t *src, const char *uuid, const char *tty,
/* tty uuid 00 0x0000 name:termios */
pos = snprintf(value, size, "%s %d 0x%04X %s:", uuid, ch, opts, name);
+ if (!ti)
+ goto done;
+
for (i = 0, pti = (uint8_t *) ti; i < sizeof(struct termios); i++, pti++)
sprintf(value + pos + (i * 2), "%2.2X", *pti);
+done:
err = textfile_put(filename, key, value);
g_free(value);