#include "gobex.h"
+#define FIRST_PACKET_TIMEOUT 60
+
static GSList *transfers = NULL;
struct transfer {
g_obex_packet_add_body(req, put_get_data, transfer);
- transfer->req_id = g_obex_send_req(obex, req, -1, transfer_response,
- transfer, err);
+ transfer->req_id = g_obex_send_req(obex, req, FIRST_PACKET_TIMEOUT,
+ transfer_response, transfer, err);
if (transfer->req_id == 0) {
transfer_free(transfer);
return 0;
g_obex_packet_add_body(req, put_get_data, transfer);
- transfer->req_id = g_obex_send_req(obex, req, -1, transfer_response,
- transfer, err);
+ transfer->req_id = g_obex_send_req(obex, req, FIRST_PACKET_TIMEOUT,
+ transfer_response, transfer, err);
if (transfer->req_id == 0) {
transfer_free(transfer);
return 0;
transfer = transfer_new(obex, G_OBEX_OP_GET, complete_func, user_data);
transfer->data_consumer = data_func;
- transfer->req_id = g_obex_send_req(obex, req, -1, transfer_response,
- transfer, err);
+ transfer->req_id = g_obex_send_req(obex, req, FIRST_PACKET_TIMEOUT,
+ transfer_response, transfer, err);
if (transfer->req_id == 0) {
transfer_free(transfer);
return 0;
first_hdr_id, args);
va_end(args);
- transfer->req_id = g_obex_send_req(obex, req, -1, transfer_response,
- transfer, err);
+ transfer->req_id = g_obex_send_req(obex, req, FIRST_PACKET_TIMEOUT,
+ transfer_response, transfer, err);
if (transfer->req_id == 0) {
transfer_free(transfer);
return 0;