[RFC v2 08/14] Change UUID128 host order on SDP PDU generation function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Converts from host to network order UUID128 values when generating
the SDP pdu. Before to send through the network, SDP 128 values
need to be converted to network order.
---
 lib/sdp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/sdp.c b/lib/sdp.c
index 75154e9..2846585 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -897,7 +897,8 @@ int sdp_gen_pdu(sdp_buf_t *buf, sdp_data_t *d)
 		src = (unsigned char *) &u32;
 		break;
 	case SDP_UUID128:
-		src = (unsigned char *) &d->val.uuid.value.uuid128;
+		hton128(&d->val.uuid.value.uuid128, &u128);
+		src = (unsigned char *) &u128;
 		break;
 	default:
 		break;
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux