Thread (31 messages) read the whole thread 31 messages, 5 authors, 2011-02-22

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

From: Claudio Takahasi <hidden>
Date: 2011-02-18 22:29:27
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help