Hello community, here is the log from the commit of package bluez-libs checked in at Fri Sep 1 01:24:00 CEST 2006. -------- --- bluez-libs/bluez-libs.changes 2006-07-31 19:25:31.000000000 +0200 +++ bluez-libs/bluez-libs.changes 2006-08-31 11:56:42.000000000 +0200 @@ -1,0 +2,16 @@ +Wed Aug 30 08:30:28 CEST 2006 - dgollub@suse.de + +- update to v3.4 + * Fix UUID128 string lookup handling + * Fix malloc() versus bt_malloc() usage. + +- update to v3.3 + * Remove kernel specific timeouts. + * Add additional private data field for SDP sessions. + * Add host number of completed packets defines. + * Initialize various memory to zero before usage. + +- moved libtoolize and autoreconf in build section +- replace libtoolize with autoreconf -sfi + +------------------------------------------------------------------- Old: ---- bluez-libs-3.2.tar.gz New: ---- bluez-libs-3.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bluez-libs.spec ++++++ --- /var/tmp/diff_new_pack.P2lKty/_old 2006-09-01 01:23:40.000000000 +0200 +++ /var/tmp/diff_new_pack.P2lKty/_new 2006-09-01 01:23:40.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package bluez-libs (Version 3.2) +# spec file for package bluez-libs (Version 3.4) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,7 +12,7 @@ Name: bluez-libs URL: http://bluez.sourceforge.net -Version: 3.2 +Version: 3.4 Release: 1 Summary: Bluetooth Libraries License: GPL @@ -36,10 +36,9 @@ %prep %setup -q %{?suse_update_config:%{suse_update_config -f . }} -libtoolize --force -autoreconf -f %build +autoreconf -sfi CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%_prefix --libdir=%_libdir --localstatedir=%_localstatedir make @@ -65,6 +64,17 @@ %doc AUTHORS COPYING INSTALL ChangeLog NEWS README %changelog -n bluez-libs +* Wed Aug 30 2006 - dgollub@suse.de +- update to v3.4 + * Fix UUID128 string lookup handling + * Fix malloc() versus bt_malloc() usage. +- update to v3.3 + * Remove kernel specific timeouts. + * Add additional private data field for SDP sessions. + * Add host number of completed packets defines. + * Initialize various memory to zero before usage. +- moved libtoolize and autoreconf in build section +- replace libtoolize with autoreconf -sfi * Mon Jul 31 2006 - seife@suse.de - update to v3.2 * Fix handling of SDP strings. ++++++ bluez-libs-3.2.tar.gz -> bluez-libs-3.4.tar.gz ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/ChangeLog new/bluez-libs-3.4/ChangeLog --- old/bluez-libs-3.2/ChangeLog 2006-07-27 06:36:59.000000000 +0200 +++ new/bluez-libs-3.4/ChangeLog 2006-08-25 03:16:10.000000000 +0200 @@ -1,4 +1,15 @@ -ver 3.2 +ver 3.4: + Fix UUID128 string lookup handling. + Fix malloc() versus bt_malloc() usage. + +ver 3.3: + Remove kernel specific timeouts. + Add additional private data field for SDP sessions. + Add host controller to host flow control defines. + Add host number of completed packets defines. + Initialize various memory to zero before usage. + +ver 3.2: Fix handling of SDP strings. Add adapter type for SDIO cards. Add features bit for link supervision timeout. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/configure new/bluez-libs-3.4/configure --- old/bluez-libs-3.2/configure 2006-07-27 06:37:35.000000000 +0200 +++ new/bluez-libs-3.4/configure 2006-08-25 03:17:57.000000000 +0200 @@ -1775,7 +1775,7 @@ # Define the identity of the package. PACKAGE=bluez-libs - VERSION=3.2 + VERSION=3.4 cat >>confdefs.h <<_ACEOF diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/configure.in new/bluez-libs-3.4/configure.in --- old/bluez-libs-3.2/configure.in 2006-07-27 06:36:59.000000000 +0200 +++ new/bluez-libs-3.4/configure.in 2006-08-25 03:16:11.000000000 +0200 @@ -1,7 +1,7 @@ AC_PREREQ(2.50) AC_INIT() -AM_INIT_AUTOMAKE(bluez-libs, 3.2) +AM_INIT_AUTOMAKE(bluez-libs, 3.4) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/include/hci.h new/bluez-libs-3.4/include/hci.h --- old/bluez-libs-3.2/include/hci.h 2006-07-27 06:36:59.000000000 +0200 +++ new/bluez-libs-3.4/include/hci.h 2006-08-22 08:26:05.000000000 +0200 @@ -98,12 +98,6 @@ #define HCIINQUIRY _IOR('H', 240, int) -/* HCI timeouts */ - -#define HCI_CONN_TIMEOUT (HZ * 40) -#define HCI_DISCONN_TIMEOUT (HZ * 2) -#define HCI_CONN_IDLE_TIMEOUT (HZ * 60) - #ifndef __NO_HCI_DEFS /* HCI Packet types */ @@ -822,6 +816,8 @@ } __attribute__ ((packed)) read_transmit_power_level_rp; #define READ_TRANSMIT_POWER_LEVEL_RP_SIZE 4 +#define OCF_SET_CONTROLLER_TO_HOST_FC 0x0031 + #define OCF_HOST_BUFFER_SIZE 0x0033 typedef struct { uint16_t acl_mtu; @@ -831,18 +827,25 @@ } __attribute__ ((packed)) host_buffer_size_cp; #define HOST_BUFFER_SIZE_CP_SIZE 7 +#define OCF_HOST_NUM_COMP_PKTS 0x0035 +typedef struct { + uint8_t num_hndl; + /* variable length part */ +} __attribute__ ((packed)) host_num_comp_pkts_cp; +#define HOST_NUM_COMP_PKTS_CP_SIZE 1 + #define OCF_READ_LINK_SUPERVISION_TIMEOUT 0x0036 typedef struct { uint8_t status; uint16_t handle; - uint16_t link_sup_to; + uint16_t timeout; } __attribute__ ((packed)) read_link_supervision_timeout_rp; #define READ_LINK_SUPERVISION_TIMEOUT_RP_SIZE 5 #define OCF_WRITE_LINK_SUPERVISION_TIMEOUT 0x0037 typedef struct { uint16_t handle; - uint16_t link_sup_to; + uint16_t timeout; } __attribute__ ((packed)) write_link_supervision_timeout_cp; #define WRITE_LINK_SUPERVISION_TIMEOUT_CP_SIZE 4 typedef struct { @@ -1401,6 +1404,13 @@ } __attribute__ ((packed)) extended_inquiry_info; #define EXTENDED_INQUIRY_INFO_SIZE 254 +#define EVT_LINK_SUPERVISION_TIMEOUT_CHANGE 0x38 +typedef struct { + uint16_t handle; + uint16_t timeout; +} __attribute__ ((packed)) evt_link_supervision_timeout_change; +#define EVT_LINK_SUPERVISION_TIMEOUT_SIZE 4 + #define EVT_TESTING 0xFE #define EVT_VENDOR 0xFF diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/include/sdp.h new/bluez-libs-3.4/include/sdp.h --- old/bluez-libs-3.2/include/sdp.h 2006-05-30 12:58:30.000000000 +0200 +++ new/bluez-libs-3.4/include/sdp.h 2006-08-22 08:26:05.000000000 +0200 @@ -374,18 +374,6 @@ #define SDP_SVC_REMOVE_RSP 0x80 /* - * Values of the flags parameter to sdp_record_register - */ -#define SDP_RECORD_PERSIST 0x01 -#define SDP_DEVICE_RECORD 0x02 - -/* - * Values of the flags parameter to sdp_connect - */ -#define SDP_RETRY_IF_BUSY 0x01 -#define SDP_WAIT_ON_CLOSE 0x02 - -/* * SDP Error codes */ #define SDP_INVALID_VERSION 0x0001 @@ -499,17 +487,6 @@ int unitSize; }; -/* - * a session with an SDP server - */ -typedef struct { - int sock; - int state; - int local; - int flags; - uint16_t tid; // Current transaction ID -} sdp_session_t; - #ifdef __cplusplus } #endif diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/include/sdp_lib.h new/bluez-libs-3.4/include/sdp_lib.h --- old/bluez-libs-3.2/include/sdp_lib.h 2006-01-03 13:56:09.000000000 +0100 +++ new/bluez-libs-3.4/include/sdp_lib.h 2006-08-22 08:26:05.000000000 +0200 @@ -70,6 +70,30 @@ } /* + * Values of the flags parameter to sdp_record_register + */ +#define SDP_RECORD_PERSIST 0x01 +#define SDP_DEVICE_RECORD 0x02 + +/* + * Values of the flags parameter to sdp_connect + */ +#define SDP_RETRY_IF_BUSY 0x01 +#define SDP_WAIT_ON_CLOSE 0x02 + +/* + * a session with an SDP server + */ +typedef struct { + int sock; + int state; + int local; + int flags; + uint16_t tid; // Current transaction ID + void *priv; +} sdp_session_t; + +/* * create an L2CAP connection to a Bluetooth device * * INPUT: @@ -83,11 +107,9 @@ */ sdp_session_t *sdp_connect(const bdaddr_t *src, const bdaddr_t *dst, uint32_t flags); int sdp_close(sdp_session_t *session); +int sdp_get_socket(const sdp_session_t *session); -static inline int sdp_get_socket(const sdp_session_t *s) -{ - return s->sock; -} +uint16_t sdp_gen_tid(sdp_session_t *session); /* * find all devices in the piconet @@ -535,14 +557,6 @@ return sdp_get_string_attr(rec, SDP_ATTR_ICON_URL, str, len); } -/* - * Generate unique transaction identifiers - */ -static inline uint16_t sdp_gen_tid(sdp_session_t *session) -{ - return session->tid++; -} - sdp_record_t *sdp_extract_pdu(const uint8_t *pdata, int *scanned); sdp_data_t *sdp_extract_string(uint8_t *, int *); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/src/Makefile.am new/bluez-libs-3.4/src/Makefile.am --- old/bluez-libs-3.2/src/Makefile.am 2006-07-27 06:36:59.000000000 +0200 +++ new/bluez-libs-3.4/src/Makefile.am 2006-08-25 03:16:11.000000000 +0200 @@ -2,7 +2,7 @@ lib_LTLIBRARIES = libbluetooth.la libbluetooth_la_SOURCES = bluetooth.c hci.c sdp.c -libbluetooth_la_LDFLAGS = -version-info 3:0:1 +libbluetooth_la_LDFLAGS = -version-info 4:1:2 INCLUDES = -I$(top_builddir)/include diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/src/Makefile.in new/bluez-libs-3.4/src/Makefile.in --- old/bluez-libs-3.2/src/Makefile.in 2006-07-27 06:37:33.000000000 +0200 +++ new/bluez-libs-3.4/src/Makefile.in 2006-08-25 03:17:56.000000000 +0200 @@ -165,7 +165,7 @@ target_alias = @target_alias@ lib_LTLIBRARIES = libbluetooth.la libbluetooth_la_SOURCES = bluetooth.c hci.c sdp.c -libbluetooth_la_LDFLAGS = -version-info 3:0:1 +libbluetooth_la_LDFLAGS = -version-info 4:1:2 INCLUDES = -I$(top_builddir)/include MAINTAINERCLEANFILES = Makefile.in all: all-am diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/src/hci.c new/bluez-libs-3.4/src/hci.c --- old/bluez-libs-3.2/src/hci.c 2006-07-27 06:36:59.000000000 +0200 +++ new/bluez-libs-3.4/src/hci.c 2006-08-25 03:16:11.000000000 +0200 @@ -94,7 +94,7 @@ static char *hci_uint2str(hci_map *m, unsigned int val) { - char *str = bt_malloc(50); + char *str = malloc(50); char *ptr = str; if (!str) @@ -174,7 +174,7 @@ char *hci_dflagstostr(uint32_t flags) { - char *str = malloc(50); + char *str = bt_malloc(50); char *ptr = str; hci_map *m = dev_flags_map; @@ -283,7 +283,7 @@ char *hci_lmtostr(unsigned int lm) { - char *s, *str = malloc(50); + char *s, *str = bt_malloc(50); if (!str) return NULL; @@ -293,7 +293,7 @@ s = hci_bit2str(link_mode_map, lm); if (!s) { - free(str); + bt_free(str); return NULL; } @@ -680,6 +680,8 @@ goto done; } + memset(dl, 0, HCI_MAX_DEV * sizeof(*dr) + sizeof(*dl)); + dl->dev_num = HCI_MAX_DEV; dr = dl->dev_req; @@ -764,6 +766,8 @@ if (dd < 0) return dd; + memset(di, 0, sizeof(struct hci_dev_info)); + di->dev_id = dev_id; ret = ioctl(dd, HCIGETDEVINFO, (void *) di); @@ -2058,7 +2062,7 @@ return -1; } - *timeout = rp.link_sup_to; + *timeout = rp.timeout; return 0; } @@ -2069,8 +2073,8 @@ struct hci_request rq; memset(&cp, 0, sizeof(cp)); - cp.handle = handle; - cp.link_sup_to = timeout; + cp.handle = handle; + cp.timeout = timeout; memset(&rq, 0, sizeof(rq)); rq.ogf = OGF_HOST_CTL; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.2/src/sdp.c new/bluez-libs-3.4/src/sdp.c --- old/bluez-libs-3.2/src/sdp.c 2006-07-27 06:36:59.000000000 +0200 +++ new/bluez-libs-3.4/src/sdp.c 2006-08-25 03:16:12.000000000 +0200 @@ -208,6 +208,24 @@ return ""; } +static char *string_lookup_uuid(struct tupla *pt0, const uuid_t* uuid) +{ + uuid_t tmp_uuid; + + memcpy(&tmp_uuid, uuid, sizeof(tmp_uuid)); + + if (sdp_uuid128_to_uuid(&tmp_uuid)) { + switch (tmp_uuid.type) { + case SDP_UUID16: + return string_lookup(pt0, tmp_uuid.value.uuid16); + case SDP_UUID32: + return string_lookup(pt0, tmp_uuid.value.uuid32); + } + } + + return ""; +} + /* * Prints into a string the Protocol UUID * coping a maximum of n characters. @@ -231,8 +249,9 @@ snprintf(str, n, str2); break; case SDP_UUID128: - snprintf(str, n, "Error: This is UUID-128"); - return -4; + str2 = string_lookup_uuid(message, uuid); + snprintf(str, n, str2); + break; default: snprintf(str, n, "Type of UUID (%x) unknown.", uuid->type); return -1; @@ -349,7 +368,7 @@ sdp_data_t *sdp_data_alloc_with_length(uint8_t dtd, const void *value, uint32_t length) { sdp_data_t *seq; - sdp_data_t *d = (sdp_data_t *) malloc(sizeof(sdp_data_t)); + sdp_data_t *d = malloc(sizeof(sdp_data_t)); if (!d) return NULL; @@ -853,7 +872,7 @@ static sdp_data_t *extract_int(const void *p, int *len) { - sdp_data_t *d = (sdp_data_t *) malloc(sizeof(sdp_data_t)); + sdp_data_t *d = malloc(sizeof(sdp_data_t)); SDPDBG("Extracting integer\n"); memset(d, 0, sizeof(sdp_data_t)); @@ -899,11 +918,11 @@ static sdp_data_t *extract_uuid(const uint8_t *p, int *len, sdp_record_t *rec) { - sdp_data_t *d = (sdp_data_t *) malloc(sizeof(sdp_data_t)); + sdp_data_t *d = malloc(sizeof(sdp_data_t)); SDPDBG("Extracting UUID"); memset(d, 0, sizeof(sdp_data_t)); - if (0 > sdp_uuid_extract(p, &d->val.uuid, len)) { + if (sdp_uuid_extract(p, &d->val.uuid, len) < 0) { free(d); return NULL; } @@ -919,7 +938,7 @@ { char *s; int n; - sdp_data_t *d = (sdp_data_t *) malloc(sizeof(sdp_data_t)); + sdp_data_t *d = malloc(sizeof(sdp_data_t)); memset(d, 0, sizeof(sdp_data_t)); d->dtd = *(uint8_t *) p; @@ -961,7 +980,7 @@ { int seqlen, n = 0; sdp_data_t *curr, *prev; - sdp_data_t *d = (sdp_data_t *)malloc(sizeof(sdp_data_t)); + sdp_data_t *d = malloc(sizeof(sdp_data_t)); SDPDBG("Extracting SEQ"); memset(d, 0, sizeof(sdp_data_t)); @@ -1297,7 +1316,7 @@ */ sdp_list_t *sdp_list_append(sdp_list_t *p, void *d) { - sdp_list_t *q, *n = (sdp_list_t *)malloc(sizeof(sdp_list_t)); + sdp_list_t *q, *n = malloc(sizeof(sdp_list_t)); if (!n) return 0; @@ -1335,7 +1354,7 @@ { sdp_list_t *q, *p, *n; - n = (sdp_list_t *)malloc(sizeof(sdp_list_t)); + n = malloc(sizeof(sdp_list_t)); if (!n) return 0; n->data = d; @@ -1471,7 +1490,7 @@ if (sdpdata && sdpdata->dtd >= SDP_SEQ8 && sdpdata->dtd <= SDP_SEQ32) { sdp_data_t *d; for (d = sdpdata->val.dataseq; d; d = d->next) { - uuid_t *u = (uuid_t *)malloc(sizeof(uuid_t)); + uuid_t *u = malloc(sizeof(uuid_t)); memset((char *)u, 0, sizeof(uuid_t)); if (d->dtd >= SDP_UUID16 && d->dtd <= SDP_UUID128) { *u = d->val.uuid; @@ -1553,7 +1572,7 @@ sdp_data_t *pEncoding = pCode->next; sdp_data_t *pOffset = pEncoding->next; if (pCode && pEncoding && pOffset) { - lang = (sdp_lang_attr_t *)malloc(sizeof(sdp_lang_attr_t)); + lang = malloc(sizeof(sdp_lang_attr_t)); lang->code_ISO639 = pCode->val.uint16; lang->encoding = pEncoding->val.uint16; lang->base_offset = pOffset->val.uint16; @@ -1594,7 +1613,7 @@ } if (uuid != NULL) { - profDesc = (sdp_profile_desc_t *)malloc(sizeof(sdp_profile_desc_t)); + profDesc = malloc(sizeof(sdp_profile_desc_t)); profDesc->uuid = *uuid; profDesc->version = version; #ifdef SDP_DEBUG @@ -2039,7 +2058,7 @@ if (bluetooth_base_uuid == NULL) { strcpy(baseStr, BASE_UUID); - bluetooth_base_uuid = (uint128_t *)malloc(sizeof(uint128_t)); + bluetooth_base_uuid = malloc(sizeof(uint128_t)); data = bluetooth_base_uuid->data; memset(data, '\0', sizeof(uint128_t)); memset(temp, '\0', 10); @@ -2201,7 +2220,7 @@ uuid_t *sdp_uuid_to_uuid128(uuid_t *uuid) { - uuid_t *uuid128 = (uuid_t *)malloc(sizeof(uuid_t)); + uuid_t *uuid128 = bt_malloc(sizeof(uuid_t)); memset(uuid128, 0, sizeof(uuid_t)); switch (uuid->type) { case SDP_UUID128: @@ -2583,7 +2602,7 @@ sdp_record_t *sdp_record_alloc() { - sdp_record_t *rec = (sdp_record_t *)malloc(sizeof(sdp_record_t)); + sdp_record_t *rec = malloc(sizeof(sdp_record_t)); memset((void *)rec, 0, sizeof(sdp_record_t)); rec->handle = 0xffffffff; return rec; @@ -2610,7 +2629,7 @@ if (sdp_list_find(rec->pattern, uuid128, sdp_uuid128_cmp) == NULL) rec->pattern = sdp_list_insert_sorted(rec->pattern, uuid128, sdp_uuid128_cmp); else - free(uuid128); + bt_free(uuid128); SDPDBG("Elements in target pattern : %d\n", sdp_list_len(rec->pattern)); } @@ -2636,7 +2655,7 @@ int n; for (n = 0; n < count; n++) { - uint32_t *pSvcRec = (uint32_t *) malloc(sizeof(uint32_t)); + uint32_t *pSvcRec = malloc(sizeof(uint32_t)); *pSvcRec = ntohl(bt_get_unaligned((uint32_t *) pdata)); pSeq = sdp_list_append(pSeq, pSvcRec); pdata += sizeof(uint32_t); @@ -3301,3 +3320,13 @@ errno = err; return 0; } + +int sdp_get_socket(const sdp_session_t *session) +{ + return session->sock; +} + +uint16_t sdp_gen_tid(sdp_session_t *session) +{ + return session->tid++; +} ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org