20190319_jeffrey - silenceuncrio/diary GitHub Wiki

0905

review

1155

M330 目前已經有 release/v0.01 這個 branch 準備下禮拜的 release

所以我對於 react 的努力就先上到 develop 這個 branch 吧

commit 583b9fdbef9ef2ee8cbb00ee8ddfbaff093e3c91
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Tue Mar 19 11:53:24 2019 +0800

    react practice:
    - refactoring `Function01` page

 .../react_01/src/components/Function01/index.js    | 30 +++++++++++++++-------
 .../react_01/src/components/Navigation/index.js    |  6 ++---
 2 files changed, 24 insertions(+), 12 deletions(-)

1455

commit 7c1a5be2b5eac03f499b67d0d239914f986c5b42
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Tue Mar 19 14:53:14 2019 +0800

    react practice:
    - while 'Sign Out' button be pressed
      - invoke 'updateUser' at 'AuthUserContext'
      - redirect to 'LandingPage'

 .../www/react_01/src/components/App/index.js       |  2 +-
 .../www/react_01/src/components/SignOut/index.js   | 52 +++++++++++++++++++---
 2 files changed, 46 insertions(+), 8 deletions(-)

1640

M330 的 CGI 還有 Big-Endian 的問題

diff --git a/proscend/prosrc/webcgi/vlan.c b/proscend/prosrc/webcgi/vlan.c
index 6209bcc..6584fd6 100644
--- a/proscend/prosrc/webcgi/vlan.c
+++ b/proscend/prosrc/webcgi/vlan.c
@@ -65,8 +65,10 @@ static void _apply()
     jweb.in.to_raw("entry_port", &entry_port_obj);
     for (int i = 0; i < VLAN_ENTRY_NUM; i ++)
     {
+        int active = 0;
         json_object *e = json_object_array_get_idx(entry_port_obj, i);
-        jweb.j.to_int(e, "active", &Vlan.entry_port[i].active);
+        jweb.j.to_int(e, "active", &active);
+        Vlan.entry_port[i].active = active;

         json_object *member_obj;
         jweb.j.to_raw(e, "member", &member_obj);

1715

是 vlan 的 active 屬性 - 該屬行也是 char

commit ebc9c28faee471c07dcd5c1ec936a86f0d181538
Refs: [release/v0.01], {origin/release/v0.01}
Author: jeffrey <[email protected]>
Date:   Tue Mar 19 17:14:50 2019 +0800

    [CGI]fix problem caused by Big-Endian

 proscend/prosrc/webcgi/vlan.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

所以上禮拜所謂的用眼睛掃一遍其實是不可靠的

1755

幫忙看一下 _current_lte_proto6->addr6_lan 的源頭

    LTE_NET_MODE _shm_lte_net_mode = ICOS_shm_status_getInt(SHM_LTE_NET_MODE);

    ...

    PROTO6INFO_T *_shm_lte0_proto6 = ICOS_shm_status_getPtr(SHM_LTE0_PROTO6);
    PROTO6INFO_T *_shm_lte1_proto6 = ICOS_shm_status_getPtr(SHM_LTE1_PROTO6);

    ...

    // current_lte_proto6

    PROTO6INFO_T *_current_lte_proto6;

    if (_shm_lte_net_mode == LTE_DUAL_APN)
    {
        _current_lte_proto6 = _shm_lte1_proto6;
    }
    else
    {
        _current_lte_proto6 = _shm_lte0_proto6;
    }

    json_object *current_lte_proto6 = json_object_new_object();

    json_object_object_add(current_lte_proto6, "addr6_lan", json_object_new_string(_current_lte_proto6->addr6_lan));

    json_object_object_add(obj, "current_lte_proto6", current_lte_proto6);