| ab6b0ae8 |
gobex: reduce duplicated code in g_obex_put_req
g_obex_put_req is quite similar to g_obex_put_req_pkt so now it just
call it to avoid duplicating this code. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +2, -16 |
| 474d67b6 |
gobex: add defines for possible values of SRM header |
Luiz Augusto von Dentz |
13 years ago |
1 file, +5, -0 |
| 7dbc3618 |
gobex: fix transfer search in transfer_complete
The previous approach searched the transfer pointer itself, assuming
that the transfers has not been modified if the pointer is in the list.
However the callback could have removed the transfer and registered
another one, which can eventually point to the same memory location.
This is solved by looking for the transfer id instead of the pointer. |
Mikel Astiz |
13 years ago |
1 file, +19, -11 |
| d2b34b6a |
gobex: Add translating error codes to strings |
Bartosz Szatkowski |
13 years ago |
2 files, +59, -0 |
| 13564dd5 |
gobex: remove unused delay on test_put_req_random |
Luiz Augusto von Dentz |
13 years ago |
1 file, +0, -1 |
| 19359ee3 |
gobex: fix wrong name of test_get_rsp_eagain |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -1 |
| 37cfa1cc |
gobex: always set CONNECTION_ID to 1 on unit tests
This simplify the creation of new test by not requiring different
variables for every connection response. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +12, -29 |
| 27249cbd |
gobex: add unit test for GET response with APPARAM |
Luiz Augusto von Dentz |
13 years ago |
1 file, +68, -0 |
| c02e6e5e |
gobex: add unit test for GET request with APPARAM |
Luiz Augusto von Dentz |
13 years ago |
1 file, +58, -0 |
| 7f604f18 |
gobex: add unit test for GET request with delay |
Luiz Augusto von Dentz |
13 years ago |
1 file, +44, -0 |
| 04bfae5d |
gobex: add unit test for PUT response with delay |
Luiz Augusto von Dentz |
13 years ago |
1 file, +86, -0 |
| 1c0b6967 |
gobex: fix removing wrong id on transfer_free
If statement checks for get_id handle but was removing req_id. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -1 |
| b8cc54f1 |
gobex: Add "cd ../dir" handling in setpath |
Bartosz Szatkowski |
13 years ago |
2 files, +52, -4 |
| 16e1f86a |
gobex: make connection id check less strict
OBEX spec says:
Only the first packet in the request needs to contain the Connection
Id header...
If a Connection Id header is received with an invalid connection
identifier, it is recommended that the operation be rejected with the
response code (0xD3) “Service Unavailable”.
Since not all requests packets need to contain Connection Id header we
should only try to validate it in case a header is received.
Reported by Hendrik Sattler <post@hendrik-sattler.de> |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -1 |
| ad8d8538 |
gobex: fix sending Connection ID header in all requests
According to both OBEX and GOEP specs Connection ID should only be
included in the first packet of a request. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +3, -0 |
| bc654c50 |
gobex: fix not tracking received responses
obex->rx_last_op is only updated if there is no pending request which
means it only store last received request. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +3, -2 |
| dd0e00c0 |
gobex: add defines for possible values of SRMP header
Also rename G_OBEX_HDR_SRM_PARAMETERS to just G_OBEX_HDR_SRMP as the spec
normally refer to it. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +6, -1 |
| 48497a48 |
gobex: add unit test for packet PUT request with random data |
Luiz Augusto von Dentz |
13 years ago |
1 file, +16, -3 |
| 74bb8e14 |
gobex: add unit test for GET response with random data |
Luiz Augusto von Dentz |
13 years ago |
1 file, +80, -0 |
| 30b091c4 |
gobex: fix checking connection id for ABORT
OBEX spec state that it is optional to send a Connection Id header in an
OBEX ABORT operation.
Reported by Hendrik Sattler <post@hendrik-sattler.de> |
Luiz Augusto von Dentz |
13 years ago |
1 file, +9, -2 |
| 648e6625 |
gobex: add unit test for CONNECT followed by PUT request with random data
Note that in order to work the buffer had to be increased to OBEX maximum
MTU otherwise test_io_cb would be sending responses for each fragment it
has read which may not constitute a full packet. |
Luiz Augusto von Dentz |
13 years ago |
2 files, +64, -1 |
| 75447e66 |
gobex: add unit test for CONNECT followed by GET wrong response |
Luiz Augusto von Dentz |
13 years ago |
1 file, +52, -0 |
| 8b6ff020 |
gobex: add unit test for CONNECT followed by PUT request |
Luiz Augusto von Dentz |
13 years ago |
1 file, +75, -1 |
| 6b1a9016 |
gobex: add unit test for CONNECT followed by GET response |
Luiz Augusto von Dentz |
13 years ago |
1 file, +59, -0 |
| a28a22a7 |
gobex: add unit test for CONNECT followed by GET request |
Luiz Augusto von Dentz |
13 years ago |
1 file, +67, -0 |
| 4f64bb1b |
gobex: add unit test for CONNECT response |
Luiz Augusto von Dentz |
13 years ago |
2 files, +63, -0 |
| e94ce4ff |
gobex: add unit test for CONNECT request |
Luiz Augusto von Dentz |
13 years ago |
1 file, +57, -0 |
| 704d8b47 |
gobex: add check for connection id
Since gobex maintain the connection id of the session it is more
convenient to check whether the incoming request connection matches
before calling the application handlers. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +26, -3 |
| 206f64d3 |
gobex: remove extra define of G_OBEX_RSP_SUCCESS |
Luiz Augusto von Dentz |
13 years ago |
1 file, +0, -1 |
| 85db8f76 |
gobex: log packets using G_OBEX_DEBUG_PACKET |
Luiz Augusto von Dentz |
13 years ago |
1 file, +38, -0 |
| f6952b7e |
gobex: log headers using G_OBEX_DEBUG_HEADER |
Luiz Augusto von Dentz |
13 years ago |
1 file, +49, -0 |
| 48bbe419 |
gobex: log transfers using G_OBEX_DEBUG_TRANSFER |
Luiz Augusto von Dentz |
13 years ago |
1 file, +50, -0 |
| fffdbad4 |
gobex: log errors using G_OBEX_DEBUG_ERROR |
Luiz Augusto von Dentz |
13 years ago |
4 files, +37, -7 |
| 54da6b6a |
gobex: add initial support for debug
This adds support for debug using GOBEX_DEBUG environment variable. |
Luiz Augusto von Dentz |
13 years ago |
2 files, +96, -0 |
| e058d7a5 |
gobex: fix includes of config.h |
Luiz Augusto von Dentz |
13 years ago |
4 files, +7, -3 |
| 3a7f9049 |
gobex: Fix decoding byte array headers with too small length
Length values of less than 3 are invalid. |
Johan Hedberg |
13 years ago |
2 files, +15, -0 |
| 1c2da643 |
gobex: Remove g_obex_packet_find_header
This was exactly the same as g_obex_packet_get_header. |
Johan Hedberg |
13 years ago |
4 files, +7, -22 |
| 6690cd3b |
gobex: log commands using G_OBEX_DEBUG_COMMAND |
Luiz Augusto von Dentz |
13 years ago |
1 file, +26, -0 |
| 745e460a |
gobex: add missing checks for config.h |
Luiz Augusto von Dentz |
13 years ago |
3 files, +12, -0 |
| bf8b5505 |
gobex: dump data when G_OBEX_DEBUG_DATA is set |
Luiz Augusto von Dentz |
13 years ago |
1 file, +12, -3 |
| 4c7baae4 |
gobex: add unit test for CONNECT followed by PUT response |
Luiz Augusto von Dentz |
13 years ago |
1 file, +61, -0 |
| 68bd9dd9 |
gobex: add option to set input/output MTU to test-server |
Luiz Augusto von Dentz |
13 years ago |
1 file, +39, -35 |
| 701f8845 |
gobex: add option to set input/output MTU to test-client |
Luiz Augusto von Dentz |
13 years ago |
1 file, +10, -20 |
| 81dd14a0 |
gobex: Use larger timeout first packet in transfers
Frequently upon receiving the first packet servers will perform some
sort of user interaction to authorize the incoming request. It's
therefore wise to use a larger timeout for this first packet on the
client side. |
Johan Hedberg |
13 years ago |
1 file, +10, -8 |
| a2204214 |
gobex: Fix request timeout handling when aborting |
Johan Hedberg |
13 years ago |
1 file, +14, -4 |
| 5b613d11 |
gobex: Protect against user callback freeing internal objects
A user callback could potentially do things like g_obex_cancel_request
or g_obex_unref while we are inside the IO watch callback. It is
therefore important to ensure that we are in a consistent state when the
user callback returns. |
Johan Hedberg |
13 years ago |
1 file, +18, -3 |
| d21fef52 |
gobex: Add unit tests for Action command functions |
Johan Hedberg |
13 years ago |
1 file, +88, -0 |
| 91e0e1c3 |
gobex: Fix opcode for Action command convenience functions |
Johan Hedberg |
13 years ago |
1 file, +2, -2 |
| afc903b0 |
gobex: Add support for Action command header offset (0) |
Johan Hedberg |
13 years ago |
1 file, +2, -0 |
| 003421ae |
gobex: Add OBEX packet header addition convenience functions |
Johan Hedberg |
13 years ago |
2 files, +52, -0 |