projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53e005b
)
telit: fix shutdown of bluetooth socket
author
Gustavo F. Padovan
<padovan@profusion.mobi>
Thu, 29 Sep 2011 17:54:22 +0000
(14:54 -0300)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 29 Sep 2011 19:03:45 +0000
(14:03 -0500)
plugins/telit.c
patch
|
blob
|
history
diff --git
a/plugins/telit.c
b/plugins/telit.c
index
7ed52a6
..
48087f2
100644
(file)
--- a/
plugins/telit.c
+++ b/
plugins/telit.c
@@
-474,12
+474,12
@@
static int telit_sap_enable(struct ofono_modem *modem,
fd = telit_sap_open();
if (fd < 0)
-
return fd
;
+
goto error
;
data->hw_io = g_io_channel_unix_new(fd);
if (data->hw_io == NULL) {
close(fd);
-
return -ENOMEM
;
+
goto error
;
}
g_io_channel_set_encoding(data->hw_io, NULL, NULL);
@@
-520,6
+520,9
@@
static int telit_sap_enable(struct ofono_modem *modem,
return -EINPROGRESS;
error:
+ shutdown(bt_fd, SHUT_RDWR);
+ close(bt_fd);
+
sap_close_io(modem);
return -EINVAL;
}