summaryrefslogtreecommitdiffstats
path: root/libmapper
Commit message (Collapse)AuthorAgeFilesLines
* clang-format updatesMatt Spinler2018-09-194-119/+123
| | | | | | | | Pick up latest clang-format from the docs repo and rerun with clang-format-6.0 Change-Id: I2f0411bb01d78f096563d63b197ce12daf43bcbd Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* libmapper: Retry when receiving ENOBUFSWilliam A. Kennington III2018-06-261-7/+4
| | | | | | | | | | | The dbus daemon can return ENOBUFS if a server has too many outstanding requests that have not yet been serviced. We've noticed during boot that the load on the mapper is great enough that we will hit this dbus limit. Since this condition eventually improves, we want to retry just like with EBUSY. Change-Id: Ia21d87fba1793016e7c9dfa835fbe7bac0085f10 Signed-off-by: William A. Kennington III <wak@google.com>
* app: Drop mapper call subcommandBrad Bishop2018-06-251-68/+0
| | | | | | | | Equivalent function can be simulated with busctl call and mapper get-service _and_ doesn't rely on systemd patches. Change-Id: Ia0c3c8d7d0290de2b6e79f18df72cac97f2b14fa Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* libmapper: Retry with exponential backoffWilliam A. Kennington III2018-06-151-14/+15
| | | | | | | | | We don't want to keep retrying every 1 second for 5 tries. This would allow the timeout to lapse for a very busy BMC and just cause more congestion. Instead backoff at exponentially increasing intervals. Change-Id: I9780d9a3dc787a6936aca2c2af30418dd2b0bf4b Signed-off-by: William A. Kennington III <wak@google.com>
* libmapper: Actually examine read errorsWilliam A. Kennington III2018-06-151-3/+17
| | | | | | | | | | | | | | | Don't rely on undefined behavior in failed read calls where some of the message is read. Right now the subtree remove callback parses the message of type "as" into a 1 element array. It uses this to determine if the array is empty or not. This depends on the underlying implementation to populate one of the array elements in the case where it has more than one and produces an error. Instead, properly enter the array container and check to see if it is empty while doing error handling for the calls. Change-Id: I542c488524a5dce5466d6196879159d888e47346 Signed-off-by: William A. Kennington III <wak@google.com>
* clang-format this repoEd Tanous2018-05-304-737/+710
| | | | | | | | Use the proper-clang-format file on this repository as required by the openbmc documentation. Change-Id: I4f1e0d707388605f1e818dfdc647533a335e5f2d Signed-off-by: Ed Tanous <ed.tanous@intel.com>
* gitignore updatesBrad Bishop2017-06-141-0/+1
| | | | | | | Ignore various build artifacts. Change-Id: I8b0447bf66844c6cfd40b57da4564324dbd0322b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* libmapper: Add subtree callback functionsAdriana Kobylak2017-05-151-0/+105
| | | | | | | | Implement subtree callback functions for match, getpaths, and timeout. Change-Id: I1037a52fced9e47aa630ebb9ae39b745349acb95 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* libmapper: Add function to call GetSubTreePathsAdriana Kobylak2017-05-151-0/+46
| | | | | | | | Call the dbus method GetSubTreePaths to look for the specified interface. Change-Id: If266fc0db2c10582eeb9438e91f9556dcb525e39 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* libmapper: Add match for removed interfacesAdriana Kobylak2017-05-151-0/+64
| | | | | | | Add a match to look for removed interfaces. Change-Id: If5bd68254b88c664c33f443ea593974b87996b42 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Create libmapper subtree function and call it in event loopAdriana Kobylak2017-05-113-0/+69
| | | | | | | | | | | Call a new mapper subtree interface in an event loop. Create an enum to specify the mapper action, in this case wait for an interface to be removed. This allows to later add other operations like wait for an interface to be added since the logic would be different. Change-Id: I8330852d47185c3c4e40e994c6e4719054a9fc06 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* app: Split subtree argumentAdriana Kobylak2017-05-111-1/+12
| | | | | | | | Split the argument string on the first colon (:) character to get the namespace and interface. Change-Id: Ia9c67bd149c23e68945fd80252a93a2f1fe78382 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* app: Add subtree-remove optionAdriana Kobylak2017-05-081-0/+18
| | | | | | | | | | | | | | | | | | | New mapper option to wait until a specified interface is not present in any of the subtrees of the specified namespace. Usage: mapper subtree-remove <NAMESPACE>:<INTERFACE> mapper subtree-remove /foo/namespace:bar.interface A future change could add an additional option to wait for interfaces to appear in a subtree of the specified path. Note that the subtree option will look for the interface in the subtree paths, not on the specified base namespace path. So in order to find an interface in /base/level1/level2, then the specified namespace path should be /base/level1/. Change-Id: I862310d819c505c59161adcce338041a08e1218c Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Revert "Add mapper-wait-until-removed"Adriana Kobylak2017-05-043-58/+25
| | | | | | | | | | | | This reverts commit 9f4c3c7c408a5f84a52416da99d0dd8035f1ae5a. After further design discussions, the new wait until removed implementation should be a new API. Reverting this change to put back the original wait interfaces since new ones will be created instead of modifying the existing ones. Change-Id: I605439dcb24c6dca7f394325afc6587eacf417f1 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Revert "wait-until-removed: Add Interface parameter"Adriana Kobylak2017-05-043-110/+4
| | | | | | | | | | This reverts commit e4d6c79030ad7b7638d0fc5ea09cf13afe224cda. The commit had incomplete changes, reverting it since the implementation is changing per feedback from code reviews. Change-Id: Ia99b9ae57cda805d419f3ed0e326c09154335051 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* wait-until-removed: Add Interface parameterAdriana Kobylak2017-04-233-4/+110
| | | | | | | | | | | | | | The additional interface parameter can be a string (ex. "intf" "obj1"), or be in a single string with the obj parameter (ex. "intf obj1 obj2..."). The latter is used when passing the parameters from a systemd unit. The wait-until-removed option will block until the requested interface is not present in the specified dbus object. Change-Id: Ia935af5721e2aec8c271eff483cff9c3a1f1fa24 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Add mapper-wait-until-removedAdriana Kobylak2017-04-213-25/+58
| | | | | | | | | This option will do the opposite of mapper wait by blocking if a dbus object exists until that object is removed. Change-Id: Ia460b1ffdb912ba475b15ae5f8499a177e801dfd Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Add get-service option to mapper toolAndrew Geissler2017-03-071-2/+39
| | | | | | | | | Adding this feature will allow services to use the busctl command without hard coding the dbus service information Change-Id: Ibdfb2e0dce97486ad4dd6784257fa81c1122dba2 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Add xyz.openbmc_project.ObjectMapper.PrivateBrad Bishop2017-02-241-46/+14
| | | | | | | | | | | | | | | | | | | | | | | | | The mapper client bindings currently use the NameOwnerChanged signal as a trigger for a mapper query when waiting for an object to appear on the bus. This works because at the moment the mapper returns a busy response to clients in the window between NameOwnerChanged and completion of its discovery. A forthcoming patch will change this behavior such that the mapper will go ahead and respond in the window to improve overall mapper responsiveness, at the cost of the current causal ordering guarantee. The ordering guarantee is what allows the current wait binding implementation to work. Without it, the wait binding requires a means to determine when it is safe to make a make a query. Add a new mapper interface xyz.openbmc_project.ObjectMapper.Private with a single signal IntrospectionComplete to meet this requirement. "Private" because the signal should only be consumed by the mapper client bindings. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ia7b65cd7edd37c49fa7b5ad808b0c59304c68717
* Workaround sd_bus_message_append_cmdlineMatthew Barth2016-11-232-0/+7
| | | | | | | | | | Unable to get libmapper built without systemd being patched with the sd_bus_message_append_cmdline function. Until it is pushed upstream, this is a workaround to get the available systemd install built for unit testing. Change-Id: Ieca78955a4182eebd469a860c37ccaedfe75d323 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Switch to use generated config.hMatthew Barth2016-11-231-3/+0
| | | | | | | | Remove libmapper/config.h and have configure put generated config.h in libmapper directory. Change-Id: I3591b719e7b66d532ddad3499c6092166ad9a442 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Add path information on service lookup failureBrad Bishop2016-11-211-2/+2
| | | | | Change-Id: Ie180b5a206eeb55c02149e5201c381652759bbdc Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* libmapper: React to DBus API changeBrad Bishop2016-11-211-4/+11
| | | | | | | | Fix up the sdbus client bindings for the new interface filter argument. Change-Id: Iabbe7ecb88ea261409b406e6499c0f6e96d1c25b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Rename mapper DBus names to match xyzBrad Bishop2016-11-211-3/+3
| | | | | | | Use the domain we actually own, per DBus naming best practices. Change-Id: I69e85d91bcf30bfab5c1d6157f399683b91dda35 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Convert build process to autotoolsMatthew Barth2016-11-091-41/+0
| | | | | | | | | Replaced the use of a manual Makefile with the use of autotools to automatically verify and generate the necessary build files. Follow the steps outlined within the README.md file to build the package. Change-Id: Id7be6220d32e457b1171d5d98123c6d8f317b380 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Use config.h defines for path, bus, and interfaceBrad Bishop2016-11-021-9/+10
| | | | | Change-Id: I1b3d09caac7fde6e7fd6c5a90a1fe4afa7613f29 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* libmapper: add config.hBrad Bishop2016-11-021-0/+3
| | | | | | | Add a fake config.h pending autotools switchover. Change-Id: I777d7b4399107db058329ab29c9299d68cfbd042 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* sdbus client: Add proper error handling for ENOENTBrad Bishop2016-09-201-4/+4
| | | | | | | Prior, a server error causes the client to hang rather than exit. Change-Id: I34533358df6227798b970f1214b574b6e5bcec47 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* sdbus client: add retriesBrad Bishop2016-09-204-14/+118
| | | | | | | Handle busy responses from the server with retries. Change-Id: I8c13faddec1bfaffe702609f2e682e8b1181946d Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove a handful of unused variablesBrad Bishop2016-08-301-3/+2
| | | | | Change-Id: Ia580acf32bf6aa7fe205bf67b283926d3cffb0cf Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Ensure all tools are building with -Wall and -WerrorMatthew Barth2016-08-301-1/+2
| | | | | | | Added -Wall to ALL_CFLAGS Change-Id: I0d85c7f333b5e56f144f4a605ea639668fdc5710 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* mapper-cli: rewrite with sdbusBrad Bishop2016-08-164-3/+483
| | | | | | | | There are too many instances of the wait/call applications spawned during BMC startup. Re-write using sdbus. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: Ia6fb3b74cb70f93cfd5cc57c1a8b7a9aa2d944c4
* Introducing libmapperBrad Bishop2016-07-274-0/+110
libmapper is a convenience library for sdbus applications that interact with the phosphor object manager. Change-Id: I5a638e0a313d575591055214cb3ac5701b730ae5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud