It will fail when you have an uci network config (swconfig part) like this:
```
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '15'
option vid '1'
option por
It will fail when you have an uci network config like this:
```
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '15'
option vid '1'
option ports '0 6t'
confi
Signed-off-by: Xiongfei Guo
---
lua/uloop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/uloop.c b/lua/uloop.c
index 4abc4c3..2a0a516 100644
--- a/lua/uloop.c
+++ b/lua/uloop.c
@@ -369,7 +369,7 @@ static luaL_reg uloop_func[] = {
{"timer", ul_timer},
{"p
Signed-off-by: Xiongfei Guo
---
...8-NET-MIPS-add-ralink-SoC-ethernet-driver.patch | 24 ++
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git
a/target/linux/ramips/patches-3.10/0118-NET-MIPS-add-ralink-SoC-ethernet-driver.patch
b/target/linux/ramips/patches-3.10/
From: Xiongfei Guo
- Support set VLAN ID of each vlan.
- Support untag feature.
- Replace register address with C MACRO.
- There are 8 ports for MT7530 actually.
Signed-off-by: Xiongfei Guo
---
...8-NET-MIPS-add-ralink-SoC-ethernet-driver.patch | 268 ++---
1 file changed, 186
The static variable `state` in `lua/uloop.c` should be clean after every
callback.
Signed-off-by: Xiongfei(Alex) Guo
---
lua/uloop.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lua/uloop.c b/lua/uloop.c
index 51f53c2..5922e04 100644
--- a/lua/uloop.c
+++ b/lua/uloop.c
@@ -43,6 +43,7 @
Use uloop.fd_add like this:
local socket = require "socket"
udp = socket.udp()
uloop.fd_add(
udp, -- socket
function( -- callback function
ufd,-- socket object when register the fd
events -- uloop events. eg. uloop.ULOOP_READ .
)
When you call the fd_add, it will return an object with `delete` method.
So you can delete that event if you want.
Signed-off-by: Xiongfei(Alex) Guo
---
examples/uloop-example.lua | 17 ++---
lua/uloop.c| 30 ++
2 files changed, 44 insertio
Signed-off-by: Xiongfei(Alex) Guo
---
examples/uloop-example.lua | 2 +-
lua/uloop.c| 12
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/examples/uloop-example.lua b/examples/uloop-example.lua
index 9b0684e..ab85a5d 100755
--- a/examples/uloop-example
fd and timeout lua object has a __gc method in its metatable. After the object
is freed and the another new object use the same reference in __uloop_cb and
__uloop_fds, the new object will be freed by the old __gc of the old object
when garbag collecting.
Signed-off-by: Xiongfei(Alex) Guo
---
lu
From: "Xiongfei(Alex) Guo"
Added fd_add method for uloop lua binding.
Use uloop.fd_add like this:
local socket = require "socket"
udp = socket.udp()
udp_read_ev = uloop.fd_add(
udp, -- socket
function( -- callback function
ufd,-- socket object when regist
Use uloop.fd_add like this:
local socket = require "socket"
udp = socket.udp()
uloop.fd_add(
udp, -- socket
function( -- callback function
ufd,-- socket object when register the fd
events -- uloop events. eg. uloop.ULOOP_READ .
)
The static variable `state` in `lua/uloop.c` should be clean after every
callback.
Signed-off-by: Xiongfei(Alex) Guo
---
lua/uloop.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lua/uloop.c b/lua/uloop.c
index 51f53c2..5922e04 100644
--- a/lua/uloop.c
+++ b/lua/uloop
13 matches
Mail list logo