c69def63 | 20-Dec-2016 |
Christian Andersen <c.andersen@kostal.com> |
match: move to bus namespace
match directly works on the bus and may be used by servers as well as clients, so sdbusplus::bus seems better suited.
Change-Id: If34ad209e83de58365bb64812d19d0bb92a2a1
match: move to bus namespace
match directly works on the bus and may be used by servers as well as clients, so sdbusplus::bus seems better suited.
Change-Id: If34ad209e83de58365bb64812d19d0bb92a2a1f0 Signed-off-by: Christian Andersen <c.andersen@kostal.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
d294557a | 15-Feb-2017 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
Add wrappers for emit_interfaces_added/removed
Wrappers for sd_bus_emit_object_added/remove already exist but these are not appropriate when adding a new interface to an already existing object, or
Add wrappers for emit_interfaces_added/removed
Wrappers for sd_bus_emit_object_added/remove already exist but these are not appropriate when adding a new interface to an already existing object, or removing an interface from an object yet other interfaces still remain.
Change-Id: I89407bd56feb7d736e7225ee27a36eaf8bda169f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
02d96758 | 19-Apr-2017 |
Patrick Williams <patrick@stwcx.xyz> |
exception: change org to xyz
The InvalidEnumString has a DBus identifier as org instead of xyz. Since our domain name is openbmc-project.xyz, this should be xyz.openbmc_project.
Change-Id: I6d2a83
exception: change org to xyz
The InvalidEnumString has a DBus identifier as org instead of xyz. Since our domain name is openbmc-project.xyz, this should be xyz.openbmc_project.
Change-Id: I6d2a83d3ba8c5d39c6176aa6a12aae607eb08a8c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
ba6f50cd | 18-Apr-2017 |
Patrick Williams <patrick@stwcx.xyz> |
bus: change constructor semantics
Previously, the bus object had no semantics to recognize if it was the primary-holder of a sd_bus or a secondary one. On destruction, the object always called 'sd_b
bus: change constructor semantics
Previously, the bus object had no semantics to recognize if it was the primary-holder of a sd_bus or a secondary one. On destruction, the object always called 'sd_bus_unref' and it was assumed that the sd-bus library would properly close the bus on last-unref. This turns out not to be true and lead to file-descriptor leaks.
Change the constructor to mimic what is done in 'message': - When the constructor is called with a sd_bus*, the class becomes a secondary-holder and calls 'sd_bus_unref' on destruction, which is the old behavior. The class also calls 'sd_bus_ref' on construction, so this should no longer be done by callers.
- When the constructor is called via the new_* functions (or by adding a std::false_type parameter), the class becomes a primary- holder and calls 'sd_bus_flush_close_unref' on destruction.
Note: Current callers that use syntax like 'bus(sd_bus_ref(b))' will need to be updated to avoid a file-descriptor leak.
Fixes openbmc/openbmc#1432.
Change-Id: Ic0c582f8fbfd44775bcdaffa6a21518a0cd056b1 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
93b0e708 | 18-Apr-2017 |
Patrick Williams <patrick@stwcx.xyz> |
exception: move InvalidEnumString functions to library
Change-Id: Ic5020eddb48d22041a51a39bae2090f379aeaeb6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
dadf83ae | 01-Mar-2017 |
Adriana Kobylak <anoo@us.ibm.com> |
Copy the tools directory from source to build directory
The python setup script looks for the needed mako templates in source directory (srcdir). But if the sdbusplus repository is built through bit
Copy the tools directory from source to build directory
The python setup script looks for the needed mako templates in source directory (srcdir). But if the sdbusplus repository is built through bitbake, the mako templates that are auto-generated are created in the build directory (builddir).
Copy all the needed files to the builddir, specify update=1 to preserve any built file from being overwritten. This allows for support of out of tree builds.
Change-Id: Icb6090df5ea083b4b5f1bc1c5b320d40f57596e0 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
c3231059 | 03-Mar-2017 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: automatically add 'Error' to error dbus paths
Change-Id: I83d51e9aaa165e646ce711cc8bc551f010edc448 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
fd43ef73 | 12-Feb-2017 |
Adriana Kobylak <anoo@linux.vnet.ibm.com> |
Disable transaction id support by default
Allow the transaction id support to be enabled via configure options. In the code, ifdef the code based if transaction support is desired.
Change-Id: I9869
Disable transaction id support by default
Allow the transaction id support to be enabled via configure options. In the code, ifdef the code based if transaction support is desired.
Change-Id: I98695268397f437b6fe14621f820fbcaecb45b7a Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
bee1a6a3 | 16-Feb-2017 |
Patrick Williams <patrick@stwcx.xyz> |
transaction: avoid recursive sdbus calls
The server bindings for transactions use the bus unique_name to create a transaction ID. If the bus object is not in RUNNING state, the unique_name call cau
transaction: avoid recursive sdbus calls
The server bindings for transactions use the bus unique_name to create a transaction ID. If the bus object is not in RUNNING state, the unique_name call causes, deep in sd-bus, a call into sd_bus_process to get the bus up and running since the unique_name is assigned by the dbus-daemon.
When DBus objects are created there is a call to generate a signal for object/interface creation. In sd-bus this creates a message and calls back into the server bindings to read all of the properties of the interface. When the transaction ID is assigned, calling unique_name, this causes a recursive entry into sd_bus_process which asserts.
The ideal solution would be to catch all C++ objects that might result in a recursive call like this and call unique_name before. This would currently be on slot, server/match, and server/interface and may be others in the future. Instead, I took a simple approach, which is to get the unique_name immediately after instantiating any bus-object.
Fixes openbmc/openbmc#1072.
Change-Id: I024fd2f46fd08c85317e102dfced88a11e18f9de Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
16e17531 | 15-Feb-2017 |
Patrick Williams <patrick@stwcx.xyz> |
message-append: Add more string test cases
Add cases uncovered by openbmc/openbmc#1025.
Change-Id: I680b95b2127d50837dccd3ea1ff655fc1eb19ec9 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
fb913e88 | 15-Feb-2017 |
Patrick Williams <patrick@stwcx.xyz> |
message-append: char* passed to sd-bus as char**
If a call to message::append resulted in the templates generating a call to sd_bus_message_append_basic, all flavors of char* were being passed to sd
message-append: char* passed to sd-bus as char**
If a call to message::append resulted in the templates generating a call to sd_bus_message_append_basic, all flavors of char* were being passed to sd_bus as char**.
Fix by adding type-templates to distinguish between T and T* for the parameters to sd_bus_message_append_basic.
Fixes openbmc/openbmc#1025.
Change-Id: I2f3a204ae10803c677d1c3aecfa4d9eabc40b593 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
5e703899 | 10-Feb-2017 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
build: Use AX for pkg config
Use an autoconf archive macro for pkg config so autoconf can fill out Requires.private in sdbusplus.pc.in.
Change-Id: I62fd658b813ecde437756aefcee91ba42a3a94b2 Signed-
build: Use AX for pkg config
Use an autoconf archive macro for pkg config so autoconf can fill out Requires.private in sdbusplus.pc.in.
Change-Id: I62fd658b813ecde437756aefcee91ba42a3a94b2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
9a0baf50 | 03-Feb-2017 |
Brad Bishop <bradleyb@us.ibm.com> |
Add wrappers for sd_bus object added/removed
Change-Id: I5031f82b4ae702d17f22a88aad56733e2a662b21 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
8ac39ee8 | 16-Jan-2017 |
Yi Li <adamliyi@msn.com> |
bus: Add interface for sd-event
With these interfaces user can attach a sd-event event loop object with sdbusplus::bus::bus.
Change-Id: I09dcc54e532162ae5e53d446772ab5bddaa4a0a4 Signed-off-by: Yi L
bus: Add interface for sd-event
With these interfaces user can attach a sd-event event loop object with sdbusplus::bus::bus.
Change-Id: I09dcc54e532162ae5e53d446772ab5bddaa4a0a4 Signed-off-by: Yi Li <adamliyi@msn.com>
show more ...
|
dfa19092 | 02-Feb-2017 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: Add server method for get-property
Add a method to the server bindings that gets properties by looking up the name from a string.
Change-Id: I304504ba20d6747afba27cd08f79bcc564c34a46 Signe
sdbus++: Add server method for get-property
Add a method to the server bindings that gets properties by looking up the name from a string.
Change-Id: I304504ba20d6747afba27cd08f79bcc564c34a46 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
4d47bf0a | 01-Feb-2017 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: Add server constructor from property-map
Add a constructor that takes a map of property-names to values and initializes all properties in the map with those values.
Change-Id: Id0eaa2ec43a
sdbus++: Add server constructor from property-map
Add a constructor that takes a map of property-names to values and initializes all properties in the map with those values.
Change-Id: Id0eaa2ec43aed490719d12537e75c1278d290013 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
9fa85520 | 01-Feb-2017 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: add server method for set-property
Add a method to the server bindings that sets properties by looking up the name from a string.
Change-Id: I7e9081b66dfeffd394155a574c2178a7cd039e2a Signe
sdbus++: add server method for set-property
Add a method to the server bindings that sets properties by looking up the name from a string.
Change-Id: I7e9081b66dfeffd394155a574c2178a7cd039e2a Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
a1fb5e6c | 30-Jan-2017 |
Adriana Kobylak <anoo@us.ibm.com> |
build: Generate package-config file
Change-Id: Id3fc546c7fabe34bc31c4030d2e196f6d7f39090 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com> |
63122257 | 26-Jan-2017 |
Adriana Kobylak <anoo@us.ibm.com> |
message: Add get bus function
Function to get the dbus bus from a dbus message. Forward declare it and implement it in bus.hpp so that the return type is sdbusplus::bus::bus.
Change-Id: Ice55c8ce48
message: Add get bus function
Function to get the dbus bus from a dbus message. Forward declare it and implement it in bus.hpp so that the return type is sdbusplus::bus::bus.
Change-Id: Ice55c8ce484ae1b575e762cc0d9e2826b4ba6504 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
990cbce3 | 26-Jan-2017 |
Adriana Kobylak <anoo@us.ibm.com> |
transaction: Generate hash for when bus and msg are not initialized
This scenario applies for clients that want to create an error log and have not made a dbus call yet.
Change-Id: I2702fc01bd66deb
transaction: Generate hash for when bus and msg are not initialized
This scenario applies for clients that want to create an error log and have not made a dbus call yet.
Change-Id: I2702fc01bd66deba2606fad92314eeed8c277277 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
291f3264 | 21-Jan-2017 |
Adriana Kobylak <anoo@us.ibm.com> |
Initialize transaction id
Initialize the transaction id in the code generated by the sdbusplus tool. Generate a unique value if the transaction id has not been initialized and a caller requests it.
Initialize transaction id
Initialize the transaction id in the code generated by the sdbusplus tool. Generate a unique value if the transaction id has not been initialized and a caller requests it. This is the scenario for clients that have not made a dbus call yet and create journal entries.
Change-Id: Ia7b926fd3f83963fac01fbd1ce4cdd59d2224008 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
1afb4e60 | 31-Jan-2017 |
Adriana Kobylak <anoo@us.ibm.com> |
Store transaction id in thread local storage
Implement the transaction id variable in a .C file and create an sdbusplus library with it. Create interfaces to set/get the transaction id.
Change-Id:
Store transaction id in thread local storage
Implement the transaction id variable in a .C file and create an sdbusplus library with it. Create interfaces to set/get the transaction id.
Change-Id: Id1df415d9cc05e4b96817c7a05c1be7052d05c65 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
5e293eca | 04-Jan-2017 |
Adriana Kobylak <anoo@us.ibm.com> |
transaction: Initial commit to create a transaction id
Create a README file to describe the transaction id. Hash specialization to create a unique transaction id by combining the hash values of the
transaction: Initial commit to create a transaction id
Create a README file to describe the transaction id. Hash specialization to create a unique transaction id by combining the hash values of the dbus bus name and message cookie.
Change-Id: Ida52774857a7ed2cca9364da15f84a30d2c3af06 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
33068471 | 24-Jan-2017 |
Brad Bishop <bradleyb@us.ibm.com> |
Allow implicit string_wrapper conversions
Add comparison operators to allow string_wrappers to be implicity converted to strings for comparisons to cut down on casting and/or str member access.
Do
Allow implicit string_wrapper conversions
Add comparison operators to allow string_wrappers to be implicity converted to strings for comparisons to cut down on casting and/or str member access.
Do not allow std::string to be impliclitly converted to object_path to avoid a temporary string copy.
Change-Id: I2e45a4fc3ee07d1df55f6fab2cfa35da205c150e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
bc4afed4 | 15-Jan-2017 |
Brad Bishop <bradleyb@us.ibm.com> |
Don't emit InterfacesRemoved unless requested
Don't invoke sd_bus_emit_object_removed unless sd_bus_emit_object_added was invoked at object creation time.
Fixes openbmc/openbmc#971
Change-Id: Ib3
Don't emit InterfacesRemoved unless requested
Don't invoke sd_bus_emit_object_removed unless sd_bus_emit_object_added was invoked at object creation time.
Fixes openbmc/openbmc#971
Change-Id: Ib3b92af3a2c03b86008f0b4f36906a367786af45 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|