Commit Graph

131 Commits

Author SHA1 Message Date
Pekka Pessi 1100838037 gisi: remove g_isi_pending_from_msg() 2011-01-18 23:34:31 +02:00
Pekka Pessi e72e5444af gisi: simplify pending management
Client or server mark their pending objects with
the function g_isi_pending_set_owner().

When client or server get destroyed or reset the pending objects are
removed with the function g_isi_remove_pending_by_owner(). As a client
or server always uses only a particular resource, all the pending
objects are conveniently stored into a single list.
2011-01-18 23:31:47 +02:00
Pekka Pessi 6238c27ba5 gisi: remove before notify
Just in case, remove pending operations before calling notifys.
The notify function can remove client, service or modem.
2011-01-18 22:29:24 +02:00
Aki Niemi b78ccac4ec gisi: Style fixes
Lines were over 80 chars.
2011-01-07 13:43:45 +02:00
Pekka Pessi 593e74f793 gisi: Simplify client interface.
Use send functions without explicit timeout. Return booleans instead
of pointers - nobody really used GIsiPending but relied on client
doing the cleanup.

Add g_isi_client_set_timeout(), g_isi_client_(v)send_with_timeout().
2011-01-07 13:38:55 +02:00
Aki Niemi ef4b7fbeaf gisi: Add API for one-shot sending of messages 2011-01-07 13:29:22 +02:00
Denis Kenzior b106db583a gisi: Don't go over 80 characters 2010-12-23 18:24:34 -06:00
Andrzej Zaborowski d9aeef28d3 gisi: fix use of unitialised variable
Set no msg.version if it's not available.
2010-12-23 18:23:50 -06:00
Aki Niemi 4ca9022358 gisi: Minor style fixes 2010-12-22 17:47:11 +02:00
Aki Niemi 19306a1e00 gisi: Minor style fix in pipe.c 2010-12-22 17:13:48 +02:00
Aki Niemi a1b20ae1da gisi: Add message tracing and debugging support 2010-12-22 17:13:48 +02:00
Aki Niemi 7d6e163184 gisi: Explicit compare to NULL 2010-12-22 17:13:48 +02:00
Aki Niemi 0bfc0ea487 gisi: Remove forward declaration 2010-12-22 17:13:48 +02:00
Aki Niemi 1f238413cb gisi: Add utility for error strings 2010-12-22 17:13:48 +02:00
Aki Niemi 0f0532eb6f gisi: Add getter for 16bit fields 2010-12-22 17:13:48 +02:00
Mika Liljeberg 8ea0c03a76 gisi: check pipe handle 2010-12-22 17:13:48 +02:00
Mika Liljeberg 3652340b1b gisi: modify reachability check
Always cache server object ID and ISI version.
2010-12-22 17:13:47 +02:00
Mika Liljeberg 38f49a769a gisi: store user data in GIsiModem 2010-12-22 17:13:47 +02:00
Aki Niemi ca3f646f8f gisi: Add constructor for sub-iterators
This is needed for decoding messages that include sub-blocks within
sub-blocks.
2010-12-22 17:13:47 +02:00
Aki Niemi 188bbc5d3b gisi: Add client API to reset instance
Calling this method will cancel any pending requests, and unsubscribe
from any pending subscriptions.
2010-12-22 17:13:47 +02:00
Pekka Pessi edd0b327e0 gisi: Remove forward reference 2010-12-22 17:13:47 +02:00
Pekka Pessi 5c4645b2f4 gisi: Use direct hashing from resource ID
Do not call modem_subs_update() after modem has already been
destroyed, but do it earlier, already after destroying all services.
2010-12-22 17:13:47 +02:00
Aki Niemi a2e434393d gisi: Fix type mismatch 2010-12-22 17:13:47 +02:00
Aki Niemi f2bcea8c4e gisi: Refactor netlink destroy function 2010-12-22 17:13:47 +02:00
Aki Niemi 50f6b06105 gisi: Split indication to use separate socket
Some resources send INDs with non-zero unique transaction ID, which
can conflict with pending RESPs. To fix this, we use two sockets, one
dedicated for INDs, and one dedicated to REQs, NTFs and RESPs.
2010-12-22 17:13:47 +02:00
Aki Niemi 0cc1bbd865 gisi: Adapt and refactor socket module
Clean up and fix naming.
2010-12-22 17:13:46 +02:00
Aki Niemi 59e61fdd6a gisi: Add include guards to pep module 2010-12-22 17:13:46 +02:00
Aki Niemi 068233c370 gisi: Adapt and refactor pipe module
Make use of the new client API and refactor the code.
2010-12-22 17:13:46 +02:00
Aki Niemi 7cd90666be gisi: Adapt and refactor netlink module
Adapt to using new modem API and clean up naming and coding
conventions.
2010-12-22 17:13:46 +02:00
Aki Niemi ee2a8bbc69 gisi: Refactor the server API
The new server API is a convenience wrapper on the modem API for
servers.
2010-12-22 17:13:46 +02:00
Aki Niemi 325e555092 gisi: Refactor the client API
The new client API is a convenience wrapper on the modem API for
clients.
2010-12-22 17:13:46 +02:00
Aki Niemi 0ccb96f9ab gisi: Remove defunct file
Resource reachability verification is now handled in the modem module.
2010-12-22 17:13:46 +02:00
Aki Niemi b8e30c153e gisi: Redesign ISI message processing
This new modem API supercedes the old client and server APIs.  It
properly queues resource subscriptions and version queries, as well as
caches reachability status for a given resource.

Also, this is a complete redesign of ISI message handling, adding
another layer of abstraction to multiplexing operations to a given
modem resource.
2010-12-22 17:13:46 +02:00
Aki Niemi 42ff2b6d17 gisi: Add convenience API for structs 2010-12-22 17:13:46 +02:00
Aki Niemi 4f14a6c179 gisi: Make subblock iterator use new message API 2010-12-22 17:13:46 +02:00
Aki Niemi 785771f0be gisi: Add separate file for common constants 2010-12-22 17:13:46 +02:00
Aki Niemi 1e8312da2b gisi: Add new API for ISI message handling 2010-12-22 17:13:46 +02:00
Lucas De Marchi 86aae128d3 gisi: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 11:53:14 -06:00
Mika Liljeberg 6fa4ee0237 gisi: return NULL instead of asserting 2010-11-11 09:23:33 +02:00
Mika Liljeberg 39823fee14 gisi: fix crash bug in g_isi_remove_subscription 2010-11-11 09:20:39 +02:00
Marcel Holtmann 27311fc4a8 gisi: Use of DBG macro is not allowed 2010-10-22 00:37:57 +02:00
Mika Liljeberg 8ebe96d996 gisi: Add method for verifying any resource
Add g_isi_verify_resource() function to GIsiClient for verifying
the reachability of an arbitrary resource.
2010-10-21 21:39:41 +03:00
Mika Liljeberg a4117e5411 gisi: store object handle for associated server 2010-10-21 21:39:41 +03:00
Mika Liljeberg 0e95bfd856 gisi: Allow subscribes towards any resources
Add methods to subscribe indications from an arbitrary resource.
Configured resource id is treated as the default. Also added separate
commit function for resource subscriptions in order to reduce the
number of subscription messages sent to the modem.
2010-10-21 21:39:41 +03:00
Mika Liljeberg 69fbe74276 gisi: make timeout optional 2010-10-21 21:39:41 +03:00
Mika Liljeberg 6462450059 gisi: Add sendto methods to GIsiClient
Add g_isi_vsendto() and g_isi_sendto() methods for sending messages to
an arbitrary Phonet address.
2010-10-21 21:39:41 +03:00
Aki Niemi 8698a0d4f2 gisi: Fix copyright and license boilerplate 2010-10-14 15:29:58 +03:00
Pekka Pessi 84888e9fa7 gisi/verify: check g_try_new0 return value 2010-10-06 17:26:26 +02:00
Aki Niemi a7879d4e0c gisi: Remove route adding API 2010-09-30 11:25:48 +03:00
Lucas De Marchi 9849f010ab Fix common misspelling in gisi
Fix common misspellings by using the list available at
http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines

From the list cited above, the substitution script found the following
misspelling:

fomr->from
2010-09-14 16:01:00 +09:00