Hello community, here is the log from the commit of package bluez-libs checked in at Mon Sep 3 18:24:41 CEST 2007. -------- --- bluez-libs/bluez-libs.changes 2007-08-30 22:25:47.000000000 +0200 +++ /mounts/work_src_done/STABLE/bluez-libs/bluez-libs.changes 2007-09-03 09:47:02.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Sep 3 09:46:36 CEST 2007 - seife@suse.de + +- update to v3.18: + * Don't allocate memory for the Bluetooth base UUID. + +------------------------------------------------------------------- Old: ---- bluez-libs-3.17.tar.bz2 New: ---- bluez-libs-3.18.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bluez-libs.spec ++++++ --- /var/tmp/diff_new_pack.v28309/_old 2007-09-03 18:23:57.000000000 +0200 +++ /var/tmp/diff_new_pack.v28309/_new 2007-09-03 18:23:57.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package bluez-libs (Version 3.17) +# spec file for package bluez-libs (Version 3.18) # # Copyright (c) 2007 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.17 +Version: 3.18 Release: 1 Summary: Bluetooth Libraries License: GPL v2 or later @@ -66,6 +66,9 @@ %doc AUTHORS COPYING INSTALL ChangeLog NEWS README %changelog +* Mon Sep 03 2007 - seife@suse.de +- update to v3.18: + * Don't allocate memory for the Bluetooth base UUID. * Thu Aug 30 2007 - seife@suse.de - update to v3.17: * Fix supported commands bit calculation. ++++++ bluez-libs-3.17.tar.bz2 -> bluez-libs-3.18.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.17/ChangeLog new/bluez-libs-3.18/ChangeLog --- old/bluez-libs-3.17/ChangeLog 2007-08-30 14:25:19.000000000 +0200 +++ new/bluez-libs-3.18/ChangeLog 2007-09-02 18:24:28.000000000 +0200 @@ -1,3 +1,6 @@ +ver 3.18: + Don't allocate memory for the Bluetooth base UUID. + ver 3.17: Fix supported commands bit calculation. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.17/configure new/bluez-libs-3.18/configure --- old/bluez-libs-3.17/configure 2007-08-30 14:27:34.000000000 +0200 +++ new/bluez-libs-3.18/configure 2007-09-02 18:25:09.000000000 +0200 @@ -2236,7 +2236,7 @@ # Define the identity of the package. PACKAGE=bluez-libs - VERSION=3.17 + VERSION=3.18 cat >>confdefs.h <<_ACEOF diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.17/configure.in new/bluez-libs-3.18/configure.in --- old/bluez-libs-3.17/configure.in 2007-08-30 14:25:19.000000000 +0200 +++ new/bluez-libs-3.18/configure.in 2007-09-02 18:24:28.000000000 +0200 @@ -1,7 +1,7 @@ AC_PREREQ(2.50) AC_INIT() -AM_INIT_AUTOMAKE(bluez-libs, 3.17) +AM_INIT_AUTOMAKE(bluez-libs, 3.18) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.17/src/Makefile.am new/bluez-libs-3.18/src/Makefile.am --- old/bluez-libs-3.17/src/Makefile.am 2007-08-30 14:25:19.000000000 +0200 +++ new/bluez-libs-3.18/src/Makefile.am 2007-09-02 18:24:28.000000000 +0200 @@ -2,7 +2,7 @@ lib_LTLIBRARIES = libbluetooth.la libbluetooth_la_SOURCES = bluetooth.c hci.c sdp.c -libbluetooth_la_LDFLAGS = -version-info 10:3:8 +libbluetooth_la_LDFLAGS = -version-info 10:4:8 INCLUDES = -I$(top_builddir)/include diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-libs-3.17/src/Makefile.in new/bluez-libs-3.18/src/Makefile.in --- old/bluez-libs-3.17/src/Makefile.in 2007-08-30 14:27:33.000000000 +0200 +++ new/bluez-libs-3.18/src/Makefile.in 2007-09-02 18:25:08.000000000 +0200 @@ -175,7 +175,7 @@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libbluetooth.la libbluetooth_la_SOURCES = bluetooth.c hci.c sdp.c -libbluetooth_la_LDFLAGS = -version-info 10:3:8 +libbluetooth_la_LDFLAGS = -version-info 10:4:8 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.17/src/sdp.c new/bluez-libs-3.18/src/sdp.c --- old/bluez-libs-3.17/src/sdp.c 2007-08-23 11:59:37.000000000 +0200 +++ new/bluez-libs-3.18/src/sdp.c 2007-09-02 18:24:28.000000000 +0200 @@ -88,7 +88,10 @@ #define BASE_UUID "00000000-0000-1000-8000-00805F9B34FB" -static uint128_t *bluetooth_base_uuid = NULL; +static uint128_t bluetooth_base_uuid = { + .data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB } +}; #define SDP_MAX_ATTR_LEN 65535 @@ -2078,6 +2081,7 @@ */ uint128_t *sdp_create_base_uuid(void) { + uint128_t *base_uuid; char baseStr[128]; int delim = '-'; unsigned long dataLongValue; @@ -2087,69 +2091,75 @@ int toBeCopied; uint8_t *data; - if (bluetooth_base_uuid == NULL) { - strcpy(baseStr, BASE_UUID); - bluetooth_base_uuid = malloc(sizeof(uint128_t)); - data = bluetooth_base_uuid->data; - memset(data, '\0', sizeof(uint128_t)); - memset(temp, '\0', 10); - dataPtr = baseStr; - delimPtr = NULL; - delimPtr = strchr(dataPtr, delim); - toBeCopied = delimPtr - dataPtr; - if (toBeCopied != 8) { - SDPDBG("To be copied(1) : %d\n", toBeCopied); - return NULL; - } - strncpy(temp, dataPtr, toBeCopied); - dataLongValue = htonl(strtoul(temp, NULL, 16)); - memcpy(&data[0], &dataLongValue, 4); + strcpy(baseStr, BASE_UUID); + base_uuid = malloc(sizeof(uint128_t)); + if (!base_uuid) + return NULL; - /* - * Get the next 4 bytes (note that there is a "-" - * between them now) - */ - memset(temp, '\0', 10); - dataPtr = delimPtr + 1; - delimPtr = strchr(dataPtr, delim); - toBeCopied = delimPtr - dataPtr; - if (toBeCopied != 4) { - SDPDBG("To be copied(2) : %d\n", toBeCopied); - return NULL; - } - strncpy(temp, dataPtr, toBeCopied); - dataPtr = delimPtr + 1; - delimPtr = strchr(dataPtr, delim); - toBeCopied = delimPtr - dataPtr; - if (toBeCopied != 4) { - SDPDBG("To be copied(3) : %d\n", toBeCopied); - return NULL; - } - strncat(temp, dataPtr, toBeCopied); - dataLongValue = htonl(strtoul(temp, NULL, 16)); - memcpy(&data[4], &dataLongValue, 4); + data = base_uuid->data; + memset(data, '\0', sizeof(uint128_t)); + memset(temp, '\0', 10); + dataPtr = baseStr; + delimPtr = NULL; + delimPtr = strchr(dataPtr, delim); + toBeCopied = delimPtr - dataPtr; + if (toBeCopied != 8) { + SDPDBG("To be copied(1) : %d\n", toBeCopied); + free(base_uuid); + return NULL; + } + strncpy(temp, dataPtr, toBeCopied); + dataLongValue = htonl(strtoul(temp, NULL, 16)); + memcpy(&data[0], &dataLongValue, 4); - /* - * Get the last 4 bytes (note that there are 6 bytes - * after the last separator, which is truncated (2+4) - */ - memset(temp, '\0', 10); - dataPtr = delimPtr + 1; - dataPtr = delimPtr + 1; - delimPtr = strchr(dataPtr, delim); - toBeCopied = delimPtr - dataPtr; - if (toBeCopied != 4) { - SDPDBG("To be copied(4) : %d\n", toBeCopied); - return NULL; - } - strncpy(temp, dataPtr, toBeCopied); - strncat(temp, (delimPtr + 1), 4); - dataLongValue = htonl(strtoul(temp, NULL, 16)); - memcpy(&data[8], &dataLongValue, 4); - dataLongValue = htonl(strtoul(delimPtr + 5, NULL, 16)); - memcpy(&data[12], &dataLongValue, 4); + /* + * Get the next 4 bytes (note that there is a "-" + * between them now) + */ + memset(temp, '\0', 10); + dataPtr = delimPtr + 1; + delimPtr = strchr(dataPtr, delim); + toBeCopied = delimPtr - dataPtr; + if (toBeCopied != 4) { + SDPDBG("To be copied(2) : %d\n", toBeCopied); + free(base_uuid); + return NULL; + } + strncpy(temp, dataPtr, toBeCopied); + dataPtr = delimPtr + 1; + delimPtr = strchr(dataPtr, delim); + toBeCopied = delimPtr - dataPtr; + if (toBeCopied != 4) { + SDPDBG("To be copied(3) : %d\n", toBeCopied); + free(base_uuid); + return NULL; + } + strncat(temp, dataPtr, toBeCopied); + dataLongValue = htonl(strtoul(temp, NULL, 16)); + memcpy(&data[4], &dataLongValue, 4); + + /* + * Get the last 4 bytes (note that there are 6 bytes + * after the last separator, which is truncated (2+4) + */ + memset(temp, '\0', 10); + dataPtr = delimPtr + 1; + dataPtr = delimPtr + 1; + delimPtr = strchr(dataPtr, delim); + toBeCopied = delimPtr - dataPtr; + if (toBeCopied != 4) { + SDPDBG("To be copied(4) : %d\n", toBeCopied); + free(base_uuid); + return NULL; } - return bluetooth_base_uuid; + strncpy(temp, dataPtr, toBeCopied); + strncat(temp, (delimPtr + 1), 4); + dataLongValue = htonl(strtoul(temp, NULL, 16)); + memcpy(&data[8], &dataLongValue, 4); + dataLongValue = htonl(strtoul(delimPtr + 5, NULL, 16)); + memcpy(&data[12], &dataLongValue, 4); + + return base_uuid; } uuid_t *sdp_uuid16_create(uuid_t *u, uint16_t val) @@ -2212,12 +2222,11 @@ unsigned short data1; // allocate a 128bit UUID and init to the Bluetooth base UUID - uint128_t *pBTBase128Bit = sdp_create_base_uuid(); - uuid128->value.uuid128 = *pBTBase128Bit; + uuid128->value.uuid128 = bluetooth_base_uuid; uuid128->type = SDP_UUID128; // extract bytes 2 and 3 of 128bit BT base UUID - memcpy(&data1, &pBTBase128Bit->data[2], 2); + memcpy(&data1, &bluetooth_base_uuid.data[2], 2); // add the given UUID (16 bits) data1 += htons(uuid16->value.uuid16); @@ -2235,12 +2244,11 @@ unsigned int data0; // allocate a 128bit UUID and init to the Bluetooth base UUID - uint128_t *pBTBase128Bit = sdp_create_base_uuid(); - uuid128->value.uuid128 = *pBTBase128Bit; + uuid128->value.uuid128 = bluetooth_base_uuid; uuid128->type = SDP_UUID128; // extract first 4 bytes - memcpy(&data0, &pBTBase128Bit->data[0], 4); + memcpy(&data0, &bluetooth_base_uuid.data[0], 4); // add the given UUID (32bits) data0 += htonl(uuid32->value.uuid32); @@ -2273,11 +2281,10 @@ */ int sdp_uuid128_to_uuid(uuid_t *uuid) { - extern uint128_t *sdp_create_base_uuid(); - int i; - uint128_t *b = sdp_create_base_uuid(); + uint128_t *b = &bluetooth_base_uuid; uint128_t *u = &uuid->value.uuid128; uint32_t data; + int i; if (uuid->type != SDP_UUID128) return 1; @@ -2290,7 +2297,7 @@ data = htonl(data); if (data <= 0xffff) { uuid->type = SDP_UUID16; - uuid->value.uuid16 = (uint16_t)data; + uuid->value.uuid16 = (uint16_t) data; } else { uuid->type = SDP_UUID32; uuid->value.uuid32 = data; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org