[OpenWrt-Devel] [PATCH] ubus: make libubus ready for linking into C++

2019-12-07 Thread Peter Stadler
Use extern "C" { ... } if using libubus.h in a C++ project. Signed-off-by: Peter Stadler --- libubus.h | 8 1 file changed, 8 insertions(+) diff --git a/libubus.h b/libubus.h index dc42ea7..6925514 100644 --- a/libubus.h +++ b/libubus.h @@ -14,6 +14,10 @@ #ifndef __LIBUBUS_

Re: [OpenWrt-Devel] UBus wire protocol documentation

2019-12-08 Thread Peter Stadler
I know only the somehow generic wiki pages of OpenWrt and looked mostly at the sources: https://git.openwrt.org/?p=project/ubus.git;a=blob;f=libubus.h https://git.openwrt.org/?p=project/libubox.git;a=blob;f=blobmsg_json.c There is also an example for a client in the tree. Currently I have a w

[OpenWrt-Devel] [PATCH] libubox: use const *attr in getters

2020-01-29 Thread Peter Stadler
blobmsg_data. Signed-off-by: Peter Stadler --- blobmsg.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/blobmsg.h b/blobmsg.h index be3c7ee..a76bc87 100644 --- a/blobmsg.h +++ b/blobmsg.h @@ -260,27 +260,27 @@ static inline int blobmsg_buf_init(struct blob_buf

Re: [OpenWrt-Devel] [PATCH] libubox: use const *attr in getters

2020-01-29 Thread Peter Stadler
Hi, thank you for your fast reply. It is not faster/smaller as the getters are indirections to blobmsg_data (optimized they should have the same performance). The problem arises, when you have a `const struct blob_attr *` and want to get the values: In C++ you cannot pass them to the get-f

[OpenWrt-Devel] [PATCH] opkg: check for reverse conflicts on install

2020-03-03 Thread Peter Stadler
Do not install a package if another package that is already installed lists the new package (or one of its providees) as conflicting. Without checking for reverse conflicts, the conflicting packages need cyclic conflicts, which are not supported by `make menuconfig`. Signed-off-by: Peter Stadler

Re: [OpenWrt-Devel] [PATCH] opkg: check for reverse conflicts on install

2020-03-05 Thread Peter Stadler
Additionally it would be good to ignore conflicting packages, when selecting a provider in `pkg_hash_fetch_best_installation_candidate`. Please look at the extended patch: Signed-off-by: Peter Stadler --- libopkg/pkg.h | 3 ++- libopkg/pkg_depends.c | 25

Re: [OpenWrt-Devel] [PATCH] opkg: check for reverse conflicts on install

2020-03-05 Thread Peter Stadler
on selection of best candidate Signed-off-by: Peter Stadler --- libopkg/pkg.h | 4 +++- libopkg/pkg_depends.c | 27 ++- libopkg/pkg_hash.c| 8 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/libopkg/pkg.h b/libopkg/pkg.h index 600fc9e

[OpenWrt-Devel] [PATCH] netifd: fix 14_migrate-dhcp-release script

2020-03-27 Thread Peter Stadler
prepend 'uci' to 'commit network' Signed-off-by: Peter Stadler --- .../netifd/files/etc/uci-defaults/14_migrate-dhcp-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/network/config/netifd/files/etc/uci-defaults/14_migrate-dhcp-releas

Re: [OpenWrt-Devel] [PATCH] netifd: fix 14_migrate-dhcp-release script

2020-03-27 Thread Peter Stadler
Or 'uci_commit network' … On 27.03.20 13:36, Peter Stadler wrote: prepend 'uci' to 'commit network' Signed-off-by: Peter Stadler --- .../netifd/files/etc/uci-defaults/14_migrate-dhcp-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[OpenWrt-Devel] [PATCH] opkg: remove inexistent files from list only

2020-04-04 Thread Peter Stadler
: Peter Stadler --- libopkg/opkg_remove.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c index 96ca558..a9c7d5a 100644 --- a/libopkg/opkg_remove.c +++ b/libopkg/opkg_remove.c @@ -355,6 +355,12 @@ void remove_data_files_and_list(pkg_t * pkg

Re: [OpenWrt-Devel] [PATCH] netifd: fix 14_migrate-dhcp-release script

2020-04-05 Thread Peter Stadler
Removing the line should be good :-) Beside the error message that `commit` is not found, I experienced no other issue. Thank you Peter ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/open

[PATCH] opkg: prioritize the latest provider (not the first)

2020-07-16 Thread Peter Stadler
`). Signed-off-by: Peter Stadler --- libopkg/pkg_hash.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index 52c64ff..9b22f01 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg/pkg_hash.c @@ -410,10 +410,15 @@ pkg_t

Re: [PATCH] opkg: prioritize the latest provider (not the first)

2020-07-16 Thread Peter Stadler
Sorry, this is the wrong patch. Please ignore it. On 16.07.20 16:28, Peter Stadler wrote: Set `priorized_matching` to the latest provider with maximum priority, such that it is similar to the other selections (especially `good_pkg_by_name`). So, we have consistency between using `opkg install

[PATCH] opkg: prioritize the latest provider (not the first)

2020-07-16 Thread Peter Stadler
:=+apkg` (if there are two providers for `apkg`). All the best, Peter Signed-off-by: Peter Stadler --- libopkg/pkg_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libopkg/pkg_hash.c b/libopkg/pkg_hash.c index 52c64ff..f564b6f 100644 --- a/libopkg/pkg_hash.c +++ b/libopkg