Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
4455c072
Commit
4455c072
authored
Jul 18, 2021
by
Fang-WANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update Json to client
parent
a828d6ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
src/minimal-ws-server/protocol_lws_minimal.c
src/minimal-ws-server/protocol_lws_minimal.c
+2
-2
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+5
-2
No files found.
src/minimal-ws-server/protocol_lws_minimal.c
View file @
4455c072
...
...
@@ -60,7 +60,7 @@ __minimal_destroy_message(void *_msg)
}
struct
per_vhost_data__minimal
*
first_vhd
=
NULL
;
int
update_client
(
int
len
,
char
*
payload
)
int
update_client
(
int
len
,
c
onst
c
har
*
payload
)
{
lwsl_user
(
"update_client %d.
\n
"
,
len
);
first_vhd
->
amsg
.
len
=
len
;
...
...
@@ -151,7 +151,7 @@ callback_minimal(struct lws *wsi, enum lws_callback_reasons reason,
memcpy
((
char
*
)
vhd
->
amsg
.
payload
+
LWS_PRE
,
in
,
len
);
vhd
->
current
++
;
update_client
(
4
,
"1234
"
);
//update_client(9,"init test
");
// /*
// * let everybody know we want to write something on them
// * as soon as they are ready
...
...
src/smf_app/smf_app.cpp
View file @
4455c072
...
...
@@ -1274,7 +1274,7 @@ evsub_id_t smf_app::handle_event_exposure_subscription(
}
extern
"C"
{
int
update_client
(
int
len
,
char
*
payload
);
int
update_client
(
int
len
,
c
onst
c
har
*
payload
);
}
//------------------------------------------------------------------------------
bool
smf_app
::
handle_nf_status_notification
(
...
...
@@ -1295,7 +1295,10 @@ bool smf_app::handle_nf_status_notification(
Logger
::
smf_app
().
debug
(
"handle_nf_status_notification NF %s is %s !"
,
profile
.
get
()
->
get_nf_type
().
c_str
(),
event_type
.
c_str
());
update_client
(
6
,
"asdfdd"
);
nlohmann
::
json
json_data
=
{};
json_data
[
"nfStatus"
]
=
event_type
.
c_str
();
json_data
[
"nfType"
]
=
profile
.
get
()
->
get_nf_type
().
c_str
();
update_client
(
json_data
.
dump
().
length
(),
json_data
.
dump
().
c_str
());
return
true
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment