diff --git a/gobex/gobex.c b/gobex/gobex.c
index 1a0e048..40757f3 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
return TRUE;
}
-gboolean g_obex_send_rsp(GObex *obex, guint8 rspcode, GError **err)
+gboolean g_obex_send_rsp(GObex *obex, guint8 rspcode, GError **err,
+ guint8 first_hdr_type, ...)
{
GObexPacket *rsp;
+ va_list args;
- rsp = g_obex_packet_new(rspcode, TRUE, G_OBEX_HDR_INVALID);
+ va_start(args, first_hdr_type);
+ rsp = g_obex_packet_new_valist(rspcode, TRUE, first_hdr_type, args);
+ va_end(args);
return g_obex_send(obex, rsp, err);
}
diff --git a/gobex/gobex.h b/gobex/gobex.h
index 7c2d4b7..a8424f3 100644
--- a/gobex/gobex.h
+++ b/gobex/gobex.h
gboolean g_obex_cancel_req(GObex *obex, guint req_id,
gboolean remove_callback);
-gboolean g_obex_send_rsp(GObex *obex, guint8 rspcode, GError **err);
+gboolean g_obex_send_rsp(GObex *obex, guint8 rspcode, GError **err,
+ guint8 first_hdr_type, ...);
void g_obex_set_disconnect_function(GObex *obex, GObexFunc func,
gpointer user_data);
diff --git a/tools/obex-server-tool.c b/tools/obex-server-tool.c
index a4cf327..3b71ac0 100644
--- a/tools/obex-server-tool.c
+++ b/tools/obex-server-tool.c
if (data->fd < 0) {
g_printerr("open(%s): %s\n", name, strerror(errno));
g_free(data);
- g_obex_send_rsp(obex, G_OBEX_RSP_FORBIDDEN, NULL);
+ g_obex_send_rsp(obex, G_OBEX_RSP_FORBIDDEN, NULL,
+ G_OBEX_HDR_INVALID);
return;
}
if (data->fd < 0) {
g_printerr("open(%s): %s\n", name, strerror(errno));
g_free(data);
- g_obex_send_rsp(obex, G_OBEX_RSP_FORBIDDEN, NULL);
+ g_obex_send_rsp(obex, G_OBEX_RSP_FORBIDDEN, NULL,
+ G_OBEX_HDR_INVALID);
return;
}