summaryrefslogtreecommitdiff
path: root/sap
Commit message (Collapse)AuthorAgeFilesLines
* sap: move it to profiles folderGustavo Padovan2012-07-108-2961/+0
|
* sap-dummy: Fix initialization if multiple adapters are presentSzymon Janc2012-07-021-2/+12
| | | | | | sap-dummy is a SAP server backend so its init function is called for each adapter registered and not only on start. Without this patch sap-dummy interface was only registered for first adapter.
* SAP: Fix server when multiple adapters are presentSzymon Janc2012-07-022-40/+26
| | | | | | | | Remove static pointer used to keep track of registered server and just pass allocated server as user data to io and DBus callbacks. It is up to backend now if multiple adapters are supported or if multiple connections are possible (one per adapter or one in total).
* SAP: Fix removing connection from serverSzymon Janc2012-07-021-11/+11
| | | | | | NULL conn member of server structure passed to function instead of static variable. This is to properly support multiple adapters. Also rename sap_conn_remove to sap_server_remove_conn.
* SAP: Use sap_server instead of sap_connection as key for driversSzymon Janc2012-07-021-87/+121
| | | | | | | This is a preparation for fixing SAP server when multiple adapters are present. This is to avoid having extra pointer from sap_connection to its sap_server struture. Only one connection per server is allowed anyway so using sap_server as key is safe.
* SAP: Make sap_error_rsp function staticSzymon Janc2012-07-022-15/+13
| | | | | | | | This error message is used to reply to SAP protocol errors and it should not be used by drivers as they don't have access to server internal state machine. Messages passed to drivers are valid and properly formatted so drivers shall use result code in response messages to indicate error (section 4.11 of SAP specification).
* SAP: Rename server variable to sap_serverSzymon Janc2012-07-021-24/+24
| | | | This is to avoid shadowing by local functions variables.
* SAP: Use proper type instead of *void for disconnect_ind paramSzymon Janc2012-07-021-3/+2
| | | | Use struct sap_connection as parameter type for clarity.
* SAP: Fix missing setting conn->io to NULL after unrefSzymon Janc2012-07-021-0/+2
| | | | | conn->io should be set to NULl after unref to avoid calling shutdown and unref twice.
* SAP: Remove not needed NULL pointer checks from send_messageSzymon Janc2012-07-021-3/+0
| | | | | Both conn and buff are always passed as valid pointers. No need to double check them.
* SAP: Introdue SAP_VDBG macro for verbose log messagesSzymon Janc2012-07-023-16/+16
| | | | | | | Some SAP operations (eg. APDU transfer) occurs very often even with simple scenarios like subscribing to GSM network. This results in flood of log messages. Since those messages are mostly usefull only when developing SAP backend hide them after SAP_DEBUG flag.
* SAP: Don't append MaxMsgSize parameter to CONNECT_RESP unconditionalySzymon Janc2012-07-024-36/+29
| | | | | | | | | | | According to SAP 1.1 specification MaxMsgSize parameter of CONNECT_RESP is conditional and should not be added for every status code. Add this parameter only if status code is "Error, Server does not support message size" (see section 4.1.1 of SAP specification). To avoid confusion maxmsgsize param is removed from sap_connect_rsp and it is assumed that SAP driver is able to handle messages with size up to SAP_BUF_SIZE bytes.
* SAP: Move SAP_DISCONNECTION_TYPE_CLIENT from sap.h to server.cSzymon Janc2012-07-022-2/+2
| | | | | SAP_DISCONNECTION_TYPE_CLIENT is an implementation detail and is not specified by SAP profile specification.
* SAP: Use switch instead of if-else in sap_status_indSzymon Janc2012-07-021-16/+25
| | | | | It makes it easier to understand what actions are performed in each server state.
* sap-dummy: Use switch insted of if-else where applicableSzymon Janc2012-07-021-28/+52
| | | | This improves readiblity of what actions are performed on each state.
* sap: Move UUID string definition to libDaniel Wagner2012-06-021-1/+1
|
* SAP: Remove not needed checks from disconnect_indSzymon Janc2012-05-271-10/+0
| | | | | | 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.
* sap-dummy: Fix DBus connection leak if interface registration failedSzymon Janc2012-05-271-0/+2
| | | | | If DBus interface registration failed dbus connection should be unreferenced.
* SAP: Remove one line of indentation in sap_io_destroySzymon Janc2012-05-271-13/+13
|
* SAP: Remove not needed src field from struct sap_serverSzymon Janc2012-05-271-4/+2
| | | | | src is only used in sap_server_register, no need to keep in memory for SAP session duration.
* SAP: Remove not needed includesSzymon Janc2012-05-272-13/+0
|
* sap-dummy: Remove not needed includesSzymon Janc2012-05-271-3/+0
|
* sap-dummy: Small refactor to sap_connect_reqSzymon Janc2012-05-271-9/+15
| | | | This makes function easier to read and more similar to rest of code.
* sap-dummy: Use constants when setting ongoing call statusSzymon Janc2012-05-271-2/+2
| | | | This improves readbility of whan new ongoing call status is being set.
* SAP: Fix some code style issueSzymon Janc2012-05-272-14/+13
|
* SAP: Remove not needed NULL pointer check in check_msgSzymon Janc2012-05-271-3/+0
| | | | Buffer passed to check_msg() is always valid.
* Do not set signature and reply in GDBus tablesLucas De Marchi2012-05-172-7/+7
| | | | | Use GDBUS_* macros, so signature and reply fields are not set in each method/signal.
* Convert GDBus methods to use macro helpersLucas De Marchi2012-05-172-7/+17
| | | | | With these macro helpers we can separate in/out arguments and use their own vector.
* Constify GDBus signal tablesLucas De Marchi2012-05-171-1/+1
| | | | | | | Constify signal tables with the following command: find . -name '*.[ch]' -exec \ sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
* Constify GDBus method tablesLucas De Marchi2012-05-172-2/+2
| | | | | | | Constify method tables with the following command: find . -name '*.[ch]' -exec \ sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
* sap: Fix tab misuseAnderson Lizardo2012-05-101-1/+1
|
* SAP: Fix not unregistering dummy interface on exitLuiz Augusto von Dentz2012-05-031-0/+3
| | | | Dummy interface is registered on plugin init and is never unregistered
* sap-u8500: Fix empty parameter list in function declarationSyam Sidhardhan2012-04-131-1/+1
|
* Fix common spelling error in code and commentsSzymon Janc2012-03-301-2/+2
| | | | Correct spelling is "incoming" not "incomming".
* SAP: Make PADDING4 macro a bit more robustSzymon Janc2012-03-021-1/+1
| | | | | Bitwise operations are done before arithmetic operations and this might cause undesired results if macro is called with parameter of form x+y.
* sap-u8500: Fix errno handling conventionAnderson Lizardo2011-11-171-8/+8
| | | | | | Variables which are assigned to the errno variable (usually called "err") should be negative, and "-err" should be used where a positive value is needed.
* SAP: Fix handling ongoing call in sap-dummyLukasz Rymanowski2011-11-101-3/+1
| | | | | | | | There is no need to send sap_connect_rsp when "call" is ended. Status Indication is enough. Also we should provide max supported msg size in the connect response having status: OK_ONGOING_CALL.
* SAP: Fix handling ongoing callLukasz Rymanowski2011-11-101-10/+28
| | | | | | | | | | 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.
* SAP: Fix for connect responseLukasz Rymanowski2011-11-101-2/+1
| | | | | | 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.
* SAP: Add support for handle ongoing callLukasz Rymanowski2011-11-101-9/+45
| | | | | With this patch support for handling connect request during ongoing call is added.
* Fix memory leak in sap pluginArek Lichwa2011-07-281-1/+0
| | | | | | | 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).
* Add SAP driver for ST-Ericsson U8500 platformSzymon Janc2011-07-131-0/+725
|
* Fix SAP message padding macroLukasz Rymanowski2011-06-281-1/+1
| | | | With this patch it is not possible to have incorrect padding equal to 4.
* Remove SAP_BUF_SIZE define from sap/server.cSzymon Janc2011-06-141-1/+0
| | | | It is already defined in sap/sap.h which is included by sap/server.c.
* Remove unused enum from sap.hSzymon Janc2011-06-141-11/+0
| | | | This is a leftover from sap code upstreaming process.
* Simplify return value in disconnect_reqWaldemar Rymarkiewicz2011-06-011-14/+7
|
* Coding style cleanup in sap serverWaldemar Rymarkiewicz2011-06-011-8/+8
|
* Fix return value in send_messageWaldemar Rymarkiewicz2011-06-011-5/+7
| | | | | send_message returns the number of sent bytes and -EIO in case of IO error now
* Clean SAP server error printoutsWaldemar Rymarkiewicz2011-06-011-44/+31
|
* Add sap_disconnect_ind interface for sap-sim driversWaldemar Rymarkiewicz2011-04-093-7/+32
| | | | | | | | 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.