btio: Fix error message when getting SCO connection handle

Error message should indicate the transport correctly which is SCO
not RFCOMM.
This commit is contained in:
Luiz Augusto von Dentz 2011-03-24 14:09:52 +02:00 committed by Marcel Holtmann
parent efebdc4ca5
commit 8a77254921
1 changed files with 2 additions and 2 deletions

View File

@ -1020,14 +1020,14 @@ static gboolean sco_get(int sock, GError **err, BtIOOption opt1, va_list args)
break;
case BT_IO_OPT_HANDLE:
if (sco_get_info(sock, &handle, dev_class) < 0) {
ERROR_FAILED(err, "RFCOMM_CONNINFO", errno);
ERROR_FAILED(err, "SCO_CONNINFO", errno);
return FALSE;
}
*(va_arg(args, uint16_t *)) = handle;
break;
case BT_IO_OPT_CLASS:
if (sco_get_info(sock, &handle, dev_class) < 0) {
ERROR_FAILED(err, "RFCOMM_CONNINFO", errno);
ERROR_FAILED(err, "SCO_CONNINFO", errno);
return FALSE;
}
memcpy(va_arg(args, uint8_t *), dev_class, 3);