diff -urN gnokii/common/cfgreader.c gnokii-mh/common/cfgreader.c --- gnokii/common/cfgreader.c Mon Apr 28 15:08:56 2003 +++ gnokii-mh/common/cfgreader.c Mon Apr 28 15:24:15 2003 @@ -463,11 +463,6 @@ gn_config_global.rfcomm_cn = 14; else gn_config_global.rfcomm_cn = atoi(val); -#ifdef HAVE_BLUETOOTH - memset(aux, 0, GN_DEVICE_NAME_MAX_LENGTH); - strncpy(aux, gn_config_global.port_device, GN_DEVICE_NAME_MAX_LENGTH); - str2ba(aux, (bdaddr_t *)&gn_config_global.port_device); -#endif return 0; } diff -urN gnokii/common/device.c gnokii-mh/common/device.c --- gnokii/common/device.c Mon Apr 28 15:00:06 2003 +++ gnokii-mh/common/device.c Mon Apr 28 15:22:49 2003 @@ -51,6 +51,9 @@ int with_hw_handshake, gn_connection_type device_type, struct gn_statemachine *state) { +#ifdef HAVE_BLUETOOTH + bdaddr_t bdaddr; +#endif state->device.type = device_type; dprintf("Serial device: opening device %s\n", file); @@ -65,7 +68,8 @@ break; #ifdef HAVE_BLUETOOTH case GN_CT_Bluetooth: - state->device.fd = bluetooth_open((bdaddr_t *)&state->config.port_device, state->config.rfcomm_cn, state); + str2ba(state->config.port_device, &bdaddr); + state->device.fd = bluetooth_open(&bdaddr, state->config.rfcomm_cn, state); break; #endif case GN_CT_Tekram: