[PATCH] ugps: add baud rate command line option

2022-01-16 Thread Wojciech Jowsa
currently, gps device baud rate is hardcoded so ugps might not work with devices that baud rate is configured to be different than 4800. Signed-off-by: Wojciech Jowsa --- main.c | 30 -- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c

[PATCH] ugps: add baud rate command line option

2022-01-16 Thread Wojciech Jowsa
currently, gps device baud rate is hardcoded so ugps might not work with devices that baud rate is configured to be different than 4800. Signed-off-by: Wojciech Jowsa --- main.c | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/main.c b

[PATCH] ugps: add baud rate command line option

2022-01-16 Thread Wojciech Jowsa
currently, gps device baud rate is hardcoded so ugps might not work with devices that baud rate is configured to be different than 4800. Signed-off-by: Wojciech Jowsa --- main.c | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/main.c b

[PATCH] ubus: add option for enabling ubus notification

2021-11-04 Thread Wojciech Jowsa
ubus notifications have to be enabled to support publish / subscribe pattern. This pattern is an alternative to polling, and can be used e.g. for streaming gps data directly to other application or a browser. Signed-off-by: Wojciech Jowsa --- main.c | 41

[PATCH] iwinfo: add guard for scan buffer overflow

2021-05-17 Thread Wojciech Jowsa
be filled only to its maximum length. Buffer length can be passed trough the len argument of the scanlist method. Signed-off-by: Wojciech Jowsa --- iwinfo_nl80211.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index

[PATCH] iwinfo: add buffer_size argument to scan method

2021-05-07 Thread Wojciech Jowsa
From: Wojciech Jowsa iwinfo crashes when scan is perforemed in the area where there are more then 500 wifi networks available. It is because a buffer with the fixed size is used. Increasing the size of the buffer fixes this problem. The size can be passed by the argument to the iwinfo scan call

Re: Fwd: C++ libubus wrapper

2021-02-04 Thread Wojciech Jowsa
> For me, putting void * pointers everywhere is an anti-pattern which I > discourage with the way the ubus api is set up. It is a lazy way to > avoid making the code more type safe, and it adds a bit of unnecessary > bloat to data structures. Void pointer has one advantage i.e. it is portable and

Fwd: C++ libubus wrapper

2021-02-04 Thread Wojciech Jowsa
czw., 4 lut 2021 o 10:32 Felix Fietkau napisał(a): > > > On 2021-02-03 20:02, Wojciech Jowsa wrote: > > Hi, > > > > I would like to write a libubus wrapper in C++. When looking into > > ubus_method and ubus_handler_t structures I don't see a place where I > &

C++ libubus wrapper

2021-02-03 Thread Wojciech Jowsa
Hi, I would like to write a libubus wrapper in C++. When looking into ubus_method and ubus_handler_t structures I don't see a place where I could pass a this pointer. It makes the handling of ubus calls in C++ a bit complicated. The solution to that case would be adding a void pointer to the

Re: [PATCH] client: don`t clear cl->dispatch

2020-11-15 Thread Wojciech Jowsa
pon., 26 paź 2020 o 09:46 napisał(a): > > From: Wojciech Jowsa > > A segfault occurs in ubus_cmp_id when a client > tries to subscribe to an ubus object after the > object was removed and added again. When the ubus > object is removed then a client subcribed to > this

[PATCH] ubus: fix uhttpd crash

2020-11-15 Thread Wojciech Jowsa
in the uh_request_done function. Signed-off-by: Wojciech Jowsa --- ubus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ubus.c b/ubus.c index cc7447e..619135c 100644 --- a/ubus.c +++ b/ubus.c @@ -357,6 +357,8 @@ static void uh_ubus_subscription_notification_remove_cb(struct ubus_context *ctx

[PATCH] ubus: allow passing sid with url

2020-11-10 Thread Wojciech Jowsa
In order to use EventSource web content's interface to server-sent events when ubus authentication is enabled, a session id has to be passed. Evensource interface does not allow to use bearer authentication header field. One of the possible solutions is to pass sid in url. Signed-off-by: Wojciech

[PATCH] client: don`t clear cl->dispatch

2020-10-26 Thread wojciech . jowsa
From: Wojciech Jowsa A segfault occurs in ubus_cmp_id when a client tries to subscribe to an ubus object after the object was removed and added again. When the ubus object is removed then a client subcribed to this object in notified about that. This causes following functon calls