[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-13
From: |
Pawel Kot |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-137-gb48beef |
Date: |
Fri, 28 Jan 2011 17:01:18 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".
The branch, master has been updated
via b48beef1c59ddae7f73410a1aeb541144fcea6f7 (commit)
from f8775455ccae8549640629dd7aa657b967adcee8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=b48beef1c59ddae7f73410a1aeb541144fcea6f7
commit b48beef1c59ddae7f73410a1aeb541144fcea6f7
Author: Pawel Kot <address@hidden>
Date: Fri Jan 28 17:38:14 2011 +0100
Execute WSACleanup() on unsuccessful initialization paths.
diff --git a/common/devices/winbluetooth.c b/common/devices/winbluetooth.c
index 4d09803..ee3ff2e 100644
--- a/common/devices/winbluetooth.c
+++ b/common/devices/winbluetooth.c
@@ -71,9 +71,10 @@ int bluetooth_open(const char *addr, uint8_t channel, struct
gn_statemachine *st
return -1;
}
/* Create a bluetooth socket */
- if ((fd = socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM)) < 0) {
+ if ((fd = socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM)) ==
INVALID_SOCKET) {
perror("socket");
dprintf("Failed to create a bluetooth socket\n");
+ WSACleanup();
return -1;
}
/* Prepare socket structure for the bluetooth socket */
@@ -82,6 +83,7 @@ int bluetooth_open(const char *addr, uint8_t channel, struct
gn_statemachine *st
if (str2ba(addr, &sa.btAddr)) {
dprintf("Incorrect bluetooth address given in the config
file\n");
closesocket(fd);
+ WSACleanup();
return -1;
}
sa.port = channel & 0xff;
@@ -90,6 +92,7 @@ int bluetooth_open(const char *addr, uint8_t channel, struct
gn_statemachine *st
perror("socket");
dprintf("Failed to connect to bluetooth socket\n");
closesocket(fd);
+ WSACleanup();
return -1;
}
return (int)fd;
-----------------------------------------------------------------------
Summary of changes:
common/devices/winbluetooth.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-137-gb48beef,
Pawel Kot <=