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
a4be8585
Commit
a4be8585
authored
Apr 03, 2015
by
Wandenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify ngx_http_push_stream_get_channel function
parent
d3fcb0ca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
ngx_http_push_stream_rbtree_util.h
include/ngx_http_push_stream_rbtree_util.h
+1
-1
ngx_http_push_stream_module_publisher.c
src/ngx_http_push_stream_module_publisher.c
+1
-1
ngx_http_push_stream_module_subscriber.c
src/ngx_http_push_stream_module_subscriber.c
+1
-1
ngx_http_push_stream_rbtree_util.c
src/ngx_http_push_stream_rbtree_util.c
+1
-1
No files found.
include/ngx_http_push_stream_rbtree_util.h
View file @
a4be8585
...
...
@@ -34,7 +34,7 @@
#ifndef NGX_HTTP_PUSH_STREAM_RBTREE_UTIL_H_
#define NGX_HTTP_PUSH_STREAM_RBTREE_UTIL_H_
static
ngx_http_push_stream_channel_t
*
ngx_http_push_stream_get_channel
(
ngx_str_t
*
id
,
ngx_log_t
*
log
,
ngx_http_push_stream_
loc_conf_t
*
cf
,
ngx_http_push_stream_
main_conf_t
*
mcf
);
static
ngx_http_push_stream_channel_t
*
ngx_http_push_stream_get_channel
(
ngx_str_t
*
id
,
ngx_log_t
*
log
,
ngx_http_push_stream_main_conf_t
*
mcf
);
static
ngx_http_push_stream_channel_t
*
ngx_http_push_stream_find_channel
(
ngx_str_t
*
id
,
ngx_log_t
*
log
,
ngx_http_push_stream_main_conf_t
*
mcf
);
static
void
ngx_rbtree_generic_insert
(
ngx_rbtree_node_t
*
temp
,
ngx_rbtree_node_t
*
node
,
ngx_rbtree_node_t
*
sentinel
,
int
(
*
compare
)
(
const
ngx_rbtree_node_t
*
left
,
const
ngx_rbtree_node_t
*
right
));
...
...
src/ngx_http_push_stream_module_publisher.c
View file @
a4be8585
...
...
@@ -97,7 +97,7 @@ ngx_http_push_stream_publisher_handler(ngx_http_request_t *r)
if
(
r
->
method
&
(
NGX_HTTP_POST
|
NGX_HTTP_PUT
))
{
// create the channel if doesn't exist
requested_channel
->
channel
=
ngx_http_push_stream_get_channel
(
requested_channel
->
id
,
r
->
connection
->
log
,
cf
,
mcf
);
requested_channel
->
channel
=
ngx_http_push_stream_get_channel
(
requested_channel
->
id
,
r
->
connection
->
log
,
mcf
);
if
(
requested_channel
->
channel
==
NULL
)
{
return
ngx_http_push_stream_send_only_header_response
(
r
,
NGX_HTTP_INTERNAL_SERVER_ERROR
,
NULL
);
}
...
...
src/ngx_http_push_stream_module_subscriber.c
View file @
a4be8585
...
...
@@ -347,7 +347,7 @@ ngx_http_push_stream_validate_channels(ngx_http_request_t *r, ngx_http_push_stre
continue
;
}
requested_channel
->
channel
=
ngx_http_push_stream_get_channel
(
requested_channel
->
id
,
r
->
connection
->
log
,
cf
,
mcf
);
requested_channel
->
channel
=
ngx_http_push_stream_get_channel
(
requested_channel
->
id
,
r
->
connection
->
log
,
mcf
);
if
(
requested_channel
->
channel
==
NULL
)
{
ngx_log_error
(
NGX_LOG_ERR
,
r
->
connection
->
log
,
0
,
"push stream module: unable to allocate memory for new channel"
);
*
status_code
=
NGX_HTTP_INTERNAL_SERVER_ERROR
;
...
...
src/ngx_http_push_stream_rbtree_util.c
View file @
a4be8585
...
...
@@ -94,7 +94,7 @@ ngx_http_push_stream_find_channel(ngx_str_t *id, ngx_log_t *log, ngx_http_push_s
// find a channel by id. if channel not found, make one, insert it, and return that.
static
ngx_http_push_stream_channel_t
*
ngx_http_push_stream_get_channel
(
ngx_str_t
*
id
,
ngx_log_t
*
log
,
ngx_http_push_stream_
loc_conf_t
*
cf
,
ngx_http_push_stream_
main_conf_t
*
mcf
)
ngx_http_push_stream_get_channel
(
ngx_str_t
*
id
,
ngx_log_t
*
log
,
ngx_http_push_stream_main_conf_t
*
mcf
)
{
ngx_http_push_stream_shm_data_t
*
data
=
mcf
->
shm_data
;
ngx_http_push_stream_channel_t
*
channel
;
...
...
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