Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
nginx-push-stream-module
Commits
89e924c6
Commit
89e924c6
authored
Jul 24, 2011
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renaming type ngx_http_push_stream_msg_template_t to ngx_http_push_stream_template_queue_t
parent
8af92c96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
ngx_http_push_stream_module.h
include/ngx_http_push_stream_module.h
+2
-2
ngx_http_push_stream_module.c
src/ngx_http_push_stream_module.c
+4
-4
ngx_http_push_stream_module_utils.c
src/ngx_http_push_stream_module_utils.c
+3
-3
No files found.
include/ngx_http_push_stream_module.h
View file @
89e924c6
...
...
@@ -36,7 +36,7 @@ typedef struct {
ngx_queue_t
queue
;
// this MUST be first
ngx_str_t
template
;
ngx_uint_t
index
;
}
ngx_http_push_stream_
msg_templat
e_t
;
}
ngx_http_push_stream_
template_queu
e_t
;
typedef
struct
{
size_t
shm_size
;
...
...
@@ -45,7 +45,7 @@ typedef struct {
ngx_str_t
channel_deleted_message_text
;
ngx_str_t
ping_message_text
;
ngx_uint_t
qtd_templates
;
ngx_http_push_stream_
msg_templat
e_t
msg_templates
;
ngx_http_push_stream_
template_queu
e_t
msg_templates
;
}
ngx_http_push_stream_main_conf_t
;
typedef
struct
{
...
...
src/ngx_http_push_stream_module.c
View file @
89e924c6
...
...
@@ -311,11 +311,11 @@ ngx_http_push_stream_send_response_all_channels_info_detailed(ngx_http_request_t
static
ngx_int_t
ngx_http_push_stream_find_or_add_template
(
ngx_conf_t
*
cf
,
ngx_str_t
template
)
{
ngx_http_push_stream_
msg_templat
e_t
*
sentinel
=
&
ngx_http_push_stream_module_main_conf
->
msg_templates
;
ngx_http_push_stream_
msg_templat
e_t
*
cur
=
sentinel
;
ngx_http_push_stream_
template_queu
e_t
*
sentinel
=
&
ngx_http_push_stream_module_main_conf
->
msg_templates
;
ngx_http_push_stream_
template_queu
e_t
*
cur
=
sentinel
;
u_char
*
aux
=
NULL
;
while
((
cur
=
(
ngx_http_push_stream_
msg_templat
e_t
*
)
ngx_queue_next
(
&
cur
->
queue
))
!=
sentinel
)
{
while
((
cur
=
(
ngx_http_push_stream_
template_queu
e_t
*
)
ngx_queue_next
(
&
cur
->
queue
))
!=
sentinel
)
{
if
(
ngx_memn2cmp
(
cur
->
template
.
data
,
template
.
data
,
cur
->
template
.
len
,
template
.
len
)
==
0
)
{
return
cur
->
index
;
}
...
...
@@ -323,7 +323,7 @@ ngx_http_push_stream_find_or_add_template(ngx_conf_t *cf, ngx_str_t template) {
ngx_http_push_stream_module_main_conf
->
qtd_templates
++
;
cur
=
ngx_pcalloc
(
cf
->
pool
,
sizeof
(
ngx_http_push_stream_
msg_templat
e_t
));
cur
=
ngx_pcalloc
(
cf
->
pool
,
sizeof
(
ngx_http_push_stream_
template_queu
e_t
));
aux
=
ngx_pcalloc
(
cf
->
pool
,
template
.
len
+
1
);
if
((
cur
==
NULL
)
||
(
aux
==
NULL
))
{
ngx_log_error
(
NGX_LOG_ERR
,
cf
->
log
,
0
,
"push stream module: unable to allocate memory for add template to main configuration"
);
...
...
src/ngx_http_push_stream_module_utils.c
View file @
89e924c6
...
...
@@ -137,8 +137,8 @@ ngx_http_push_stream_msg_t *
ngx_http_push_stream_convert_char_to_msg_on_shared_locked
(
u_char
*
data
,
size_t
len
,
ngx_http_push_stream_channel_t
*
channel
,
ngx_int_t
id
,
ngx_pool_t
*
temp_pool
)
{
ngx_slab_pool_t
*
shpool
=
(
ngx_slab_pool_t
*
)
ngx_http_push_stream_shm_zone
->
shm
.
addr
;
ngx_http_push_stream_
msg_template_t
*
sentinel
=
&
ngx_http_push_stream_module_main_conf
->
msg_templates
;
ngx_http_push_stream_
msg_template_t
*
cur
=
sentinel
;
ngx_http_push_stream_
template_queue_t
*
sentinel
=
&
ngx_http_push_stream_module_main_conf
->
msg_templates
;
ngx_http_push_stream_
template_queue_t
*
cur
=
sentinel
;
ngx_http_push_stream_msg_t
*
msg
;
int
i
=
0
;
...
...
@@ -178,7 +178,7 @@ ngx_http_push_stream_convert_char_to_msg_on_shared_locked(u_char *data, size_t l
msg
->
raw
.
len
=
len
;
msg
->
formatted_messages
=
ngx_slab_alloc_locked
(
shpool
,
sizeof
(
ngx_str_t
)
*
ngx_http_push_stream_module_main_conf
->
qtd_templates
);
while
((
cur
=
(
ngx_http_push_stream_
msg_templat
e_t
*
)
ngx_queue_next
(
&
cur
->
queue
))
!=
sentinel
)
{
while
((
cur
=
(
ngx_http_push_stream_
template_queu
e_t
*
)
ngx_queue_next
(
&
cur
->
queue
))
!=
sentinel
)
{
ngx_str_t
*
aux
=
ngx_http_push_stream_format_message
(
channel
,
msg
,
cur
->
template
,
temp_pool
);
ngx_str_t
*
chunk
=
ngx_http_push_stream_get_formatted_chunk
(
aux
->
data
,
aux
->
len
,
temp_pool
);
...
...
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