From 26c787542c3949e2b64564ce84c3f52761b275d1 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 22 Aug 2007 15:01:52 +0000 Subject: serial: added proxy for unix sockets --- serial/storage.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'serial/storage.c') 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); -- cgit