diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c
index 5765c8b..e2914a4 100644
--- a/gobex/gobex-packet.c
+++ b/gobex/gobex-packet.c
return pkt->opcode;
}
-GObexHeader *g_obex_packet_find_header(GObexPacket *pkt, guint8 id)
-{
- GSList *l;
-
- for (l = pkt->headers; l != NULL; l = g_slist_next(l)) {
- GObexHeader *hdr = l->data;
-
- if (g_obex_header_get_id(hdr) == id)
- return hdr;
- }
-
- return NULL;
-}
-
gboolean g_obex_packet_prepend_header(GObexPacket *pkt, GObexHeader *header)
{
pkt->headers = g_slist_prepend(pkt->headers, header);
diff --git a/gobex/gobex-packet.h b/gobex/gobex-packet.h
index 6bdfcf0..24c9dcc 100644
--- a/gobex/gobex-packet.h
+++ b/gobex/gobex-packet.h
GObexHeader *g_obex_packet_get_header(GObexPacket *pkt, guint8 id);
GObexHeader *g_obex_packet_get_body(GObexPacket *pkt);
guint8 g_obex_packet_get_operation(GObexPacket *pkt, gboolean *final);
-GObexHeader *g_obex_packet_find_header(GObexPacket *pkt, guint8 id);
gboolean g_obex_packet_prepend_header(GObexPacket *pkt, GObexHeader *header);
gboolean g_obex_packet_add_header(GObexPacket *pkt, GObexHeader *header);
gboolean g_obex_packet_add_body(GObexPacket *pkt, GObexDataProducer func,
diff --git a/gobex/gobex.c b/gobex/gobex.c
index 5f9e9db..b2c0199 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
init_connect_data(obex, &data);
g_obex_packet_set_data(rsp, &data, sizeof(data), G_OBEX_DATA_COPY);
- connid = g_obex_packet_find_header(rsp, G_OBEX_HDR_CONNECTION);
+ connid = g_obex_packet_get_header(rsp, G_OBEX_HDR_CONNECTION);
if (connid != NULL) {
g_obex_header_get_uint32(connid, &obex->conn_id);
return;
if (obex->conn_id == CONNID_INVALID)
goto create_pending;
- connid = g_obex_packet_find_header(req, G_OBEX_HDR_CONNECTION);
+ connid = g_obex_packet_get_header(req, G_OBEX_HDR_CONNECTION);
if (connid != NULL)
goto create_pending;
obex->tx_mtu = obex->io_tx_mtu;
obex->tx_buf = g_realloc(obex->tx_buf, obex->tx_mtu);
- connid = g_obex_packet_find_header(pkt, G_OBEX_HDR_CONNECTION);
+ connid = g_obex_packet_get_header(pkt, G_OBEX_HDR_CONNECTION);
if (connid != NULL)
g_obex_header_get_uint32(connid, &obex->conn_id);
}
diff --git a/tools/obex-server-tool.c b/tools/obex-server-tool.c
index 4b39ba8..7db153e 100644
--- a/tools/obex-server-tool.c
+++ b/tools/obex-server-tool.c
struct transfer_data *data;
gsize type_len;
- hdr = g_obex_packet_find_header(req, G_OBEX_HDR_TYPE);
+ hdr = g_obex_packet_get_header(req, G_OBEX_HDR_TYPE);
if (hdr != NULL) {
g_obex_header_get_bytes(hdr, (const guint8 **) &type,
&type_len);
} else
type = NULL;
- hdr = g_obex_packet_find_header(req, G_OBEX_HDR_NAME);
+ hdr = g_obex_packet_get_header(req, G_OBEX_HDR_NAME);
if (hdr != NULL)
g_obex_header_get_unicode(hdr, &name);
else
GObexHeader *hdr;
gsize type_len;
- hdr = g_obex_packet_find_header(req, G_OBEX_HDR_TYPE);
+ hdr = g_obex_packet_get_header(req, G_OBEX_HDR_TYPE);
if (hdr != NULL) {
g_obex_header_get_bytes(hdr, (const guint8 **) &type,
&type_len);
} else
type = NULL;
- hdr = g_obex_packet_find_header(req, G_OBEX_HDR_NAME);
+ hdr = g_obex_packet_get_header(req, G_OBEX_HDR_NAME);
if (hdr != NULL)
g_obex_header_get_unicode(hdr, &name);
else