Commit Graph

32 Commits

Author SHA1 Message Date
Daniel Wagner
8f13cb2beb sap: Move UUID string definition to lib 2012-06-02 09:07:36 +08:00
Szymon Janc
a9262df671 SAP: Remove not needed checks from disconnect_ind
disconnect_ind is an helper funtion and is always called with valid
connection and from valid state so there is no need to double check
that.
2012-05-27 22:41:46 +03:00
Szymon Janc
b7bc38497e SAP: Remove one line of indentation in sap_io_destroy 2012-05-27 22:41:22 +03:00
Szymon Janc
e4dbf8270b SAP: Remove not needed src field from struct sap_server
src is only used in sap_server_register, no need to keep in memory for
SAP session duration.
2012-05-27 22:40:54 +03:00
Szymon Janc
1b65dde9ae SAP: Remove not needed includes 2012-05-27 22:40:46 +03:00
Szymon Janc
b195527711 SAP: Fix some code style issue 2012-05-27 22:40:10 +03:00
Szymon Janc
3f03b1cff8 SAP: Remove not needed NULL pointer check in check_msg
Buffer passed to check_msg() is always valid.
2012-05-27 22:38:12 +03:00
Lucas De Marchi
7eebe7fb41 Do not set signature and reply in GDBus tables
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
2012-05-17 20:32:21 -07:00
Lucas De Marchi
aa3b9016bf Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
2012-05-17 20:32:20 -07:00
Lucas De Marchi
25a42e675a Constify GDBus signal tables
Constify signal tables with the following command:

    find . -name '*.[ch]' -exec \
             sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
2012-05-17 20:32:20 -07:00
Lucas De Marchi
665014ce89 Constify GDBus method tables
Constify method tables with the following command:

find . -name '*.[ch]' -exec \
	     sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
2012-05-17 20:32:20 -07:00
Anderson Lizardo
6832175e05 sap: Fix tab misuse 2012-05-10 16:43:42 -07:00
Szymon Janc
2f6a0a6641 Fix common spelling error in code and comments
Correct spelling is "incoming" not "incomming".
2012-03-30 13:10:11 +03:00
Szymon Janc
097f46d93d SAP: Make PADDING4 macro a bit more robust
Bitwise operations are done before arithmetic operations and this might
cause undesired results if macro is called with parameter of form x+y.
2012-03-02 14:38:06 -08:00
Lukasz Rymanowski
519ff20d9e SAP: Fix handling ongoing call
If device is in ongoing call SAP server shall response on connect with
connection status 0x04 and once call is ended shall send reset status
indication.

With this patch, when reset status indication comes from backend and SAP
server is in connection in progreess state, SAP server changes state to
connected.
2011-11-10 10:24:46 +02:00
Lukasz Rymanowski
2d6ca05225 SAP: Fix for connect response
Max Message size shall be added to connect response when
ConnectionStatus is SAP_STATUS_OK_ONGOING_CALL. Let's always attach
maxmsgsize to the connect response if it is provided by the backend.
2011-11-10 10:24:29 +02:00
Arek Lichwa
de16dfe912 Fix memory leak in sap plugin
Without this patch, when dropping RFCOMM channel to sap server, the
component's channel cleanup process doesn't release assigned GIOChannel
resources since conn->io is set to NULL before calling sap_conn_remove
(which would normally do the g_io_channel_unref).
2011-07-28 10:48:44 +03:00
Lukasz Rymanowski
d70388cda5 Fix SAP message padding macro
With this patch it is not possible to have incorrect padding equal to 4.
2011-06-28 10:51:15 +03:00
Szymon Janc
d3750509b3 Remove SAP_BUF_SIZE define from sap/server.c
It is already defined in sap/sap.h which is included by sap/server.c.
2011-06-14 10:46:21 +03:00
Waldemar Rymarkiewicz
05e51adf10 Simplify return value in disconnect_req 2011-06-01 14:47:41 +03:00
Waldemar Rymarkiewicz
d77b3e021a Coding style cleanup in sap server 2011-06-01 14:47:04 +03:00
Waldemar Rymarkiewicz
6890d51291 Fix return value in send_message
send_message returns the number of sent bytes and -EIO in case of
IO error now
2011-06-01 14:44:21 +03:00
Waldemar Rymarkiewicz
b90dd1154c Clean SAP server error printouts 2011-06-01 14:43:53 +03:00
Waldemar Rymarkiewicz
4e02012afe Add sap_disconnect_ind interface for sap-sim drivers
The sap_disconnect_ind() let's the sim driver to indicate
immediate disconnection.

Add support of immediate disconnection in sap-dummy driver
as well as a card status change in order to pass all PTS tests.
2011-04-09 11:10:28 -07:00
Johan Hedberg
2bd4b645a1 Fix use of unninitialized UUID value in SAP code 2011-03-28 16:32:04 +03:00
Johan Hedberg
65ee365705 Fix SAP server double-free during unregistration 2011-03-28 16:08:35 +03:00
Waldemar Rymarkiewicz
b785550749 Add support for SAP protocol
Add new protocol features:
	* transfer APDu request/response
	* get ATR request/response
	* power sim of/on request/response
	* card reader status
	* set transport protocol
2011-03-23 14:51:14 +02:00
Waldemar Rymarkiewicz
3827cfbc00 Add Sim Access Profile connect/disconnect procedures
Add support for SAP protocol features:
	* connect and disconnect requests
	* connect and disconnect responses
	* disconnect indication
	* timeouts for the valid connection
2011-03-23 14:47:50 +02:00
Johan Hedberg
b98c30a065 Fix minor coding style issues in SAP server code 2011-03-15 22:22:52 +02:00
Waldemar Rymarkiewicz
caa8299225 Add Sim Access Profile Server
Add a Sim Access Server to the SAP plugin and a framework for the dummy
sap driver as well.

	* add the server register and unregister rutines
	* add server listening socket setup
	* add SAP DBus API
	* add prototypes for SAP protocol implementation
	* add skeleton of dummy SIM driver
2011-03-15 19:51:01 +02:00
Waldemar Rymarkiewicz
d4542f4268 Adjust sap/server.c license text to the rest of the code 2011-03-15 19:41:11 +02:00
Waldemar Rymarkiewicz
e3c94accd0 Add Sim Access Profile Manager
Add a SAP plugin main file and the plugin manager. Also include the SAP
plugin in the Makefile.
2011-03-10 16:03:50 +02:00