diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2011-07-04 22:13:28 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-12-04 22:21:58 +0100 |
commit | a47064623286c0327eedd9f6cbb1e14e50de8032 (patch) | |
tree | f36055f417d565a17dff3e96c4e5bc222745319f /gobex/gobex-packet.c | |
parent | 9714844c668bca74181064ea01a62e40b2bae075 (diff) | |
download | bluez-a47064623286c0327eedd9f6cbb1e14e50de8032.tar.gz |
gobex: Add convenience response sending function
Diffstat (limited to 'gobex/gobex-packet.c')
-rw-r--r-- | gobex/gobex-packet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c index 89f14e4e3..e55b20569 100644 --- a/gobex/gobex-packet.c +++ b/gobex/gobex-packet.c @@ -116,7 +116,7 @@ gboolean g_obex_packet_set_data(GObexPacket *pkt, const void *data, gsize len, return TRUE; } -GObexPacket *g_obex_packet_new(guint8 opcode, gboolean final) +GObexPacket *g_obex_packet_new(guint8 opcode, gboolean final, GSList *headers) { GObexPacket *pkt; @@ -124,6 +124,7 @@ GObexPacket *g_obex_packet_new(guint8 opcode, gboolean final) pkt->opcode = opcode; pkt->final = final; + pkt->headers = headers; pkt->data_policy = G_OBEX_DATA_COPY; @@ -214,7 +215,7 @@ GObexPacket *g_obex_packet_decode(const void *data, gsize len, final = (opcode & FINAL_BIT) ? TRUE : FALSE; opcode &= ~FINAL_BIT; - pkt = g_obex_packet_new(opcode, final); + pkt = g_obex_packet_new(opcode, final, NULL); if (header_offset == 0) goto headers; |