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
e588ef80
Commit
e588ef80
authored
Mar 16, 2012
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace some calls to ngx_copy for ngx_memcpy
parent
04f07211
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
11 deletions
+8
-11
ngx_http_push_stream_module_version.h
include/ngx_http_push_stream_module_version.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_utils.c
src/ngx_http_push_stream_module_utils.c
+4
-6
ngx_http_push_stream_rbtree_util.c
src/ngx_http_push_stream_rbtree_util.c
+2
-3
No files found.
include/ngx_http_push_stream_module_version.h
View file @
e588ef80
...
@@ -27,6 +27,6 @@
...
@@ -27,6 +27,6 @@
#define NGX_HTTP_PUSH_STREAM_MODULE_VERSION_H_
#define NGX_HTTP_PUSH_STREAM_MODULE_VERSION_H_
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_TAG
=
ngx_string
(
"0.3.2"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_TAG
=
ngx_string
(
"0.3.2"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_COMMIT
=
ngx_string
(
"
c3f6fdd8c1a9d2da63552e9949bf82f430aeb939
"
);
static
const
ngx_str_t
NGX_HTTP_PUSH_STREAM_COMMIT
=
ngx_string
(
"
04f0721170654f29ae8d4f0bfb4e718cab61cf1c
"
);
#endif
/* NGX_HTTP_PUSH_STREAM_MODULE_VERSION_H_ */
#endif
/* NGX_HTTP_PUSH_STREAM_MODULE_VERSION_H_ */
src/ngx_http_push_stream_module_publisher.c
View file @
e588ef80
...
@@ -195,7 +195,7 @@ ngx_http_push_stream_publisher_body_handler(ngx_http_request_t *r)
...
@@ -195,7 +195,7 @@ ngx_http_push_stream_publisher_body_handler(ngx_http_request_t *r)
}
}
ngx_http_push_stream_send_response_channel_info
(
r
,
channel
);
ngx_http_push_stream_send_response_channel_info
(
r
,
channel
);
ngx_http_finalize_request
(
r
,
NGX_
HTTP_
OK
);
ngx_http_finalize_request
(
r
,
NGX_OK
);
return
;
return
;
}
}
...
...
src/ngx_http_push_stream_module_utils.c
View file @
e588ef80
...
@@ -155,8 +155,6 @@ ngx_http_push_stream_delete_worker_channel(void)
...
@@ -155,8 +155,6 @@ ngx_http_push_stream_delete_worker_channel(void)
ngx_uint_t
ngx_uint_t
ngx_http_push_stream_apply_text_template
(
ngx_str_t
**
dst_value
,
ngx_str_t
**
dst_message
,
ngx_str_t
*
text
,
const
ngx_str_t
*
template
,
const
ngx_str_t
*
token
,
ngx_slab_pool_t
*
shpool
,
ngx_pool_t
*
temp_pool
)
ngx_http_push_stream_apply_text_template
(
ngx_str_t
**
dst_value
,
ngx_str_t
**
dst_message
,
ngx_str_t
*
text
,
const
ngx_str_t
*
template
,
const
ngx_str_t
*
token
,
ngx_slab_pool_t
*
shpool
,
ngx_pool_t
*
temp_pool
)
{
{
u_char
*
last
;
if
(
text
!=
NULL
)
{
if
(
text
!=
NULL
)
{
if
((
*
dst_value
=
ngx_slab_alloc_locked
(
shpool
,
sizeof
(
ngx_str_t
)
+
text
->
len
+
1
))
==
NULL
)
{
if
((
*
dst_value
=
ngx_slab_alloc_locked
(
shpool
,
sizeof
(
ngx_str_t
)
+
text
->
len
+
1
))
==
NULL
)
{
return
NGX_ERROR
;
return
NGX_ERROR
;
...
@@ -164,8 +162,8 @@ ngx_http_push_stream_apply_text_template(ngx_str_t **dst_value, ngx_str_t **dst_
...
@@ -164,8 +162,8 @@ ngx_http_push_stream_apply_text_template(ngx_str_t **dst_value, ngx_str_t **dst_
(
*
dst_value
)
->
len
=
text
->
len
;
(
*
dst_value
)
->
len
=
text
->
len
;
(
*
dst_value
)
->
data
=
(
u_char
*
)
((
*
dst_value
)
+
1
);
(
*
dst_value
)
->
data
=
(
u_char
*
)
((
*
dst_value
)
+
1
);
last
=
ngx_co
py
((
*
dst_value
)
->
data
,
text
->
data
,
text
->
len
);
ngx_memc
py
((
*
dst_value
)
->
data
,
text
->
data
,
text
->
len
);
*
last
=
'\0'
;
(
*
dst_value
)
->
data
[(
*
dst_value
)
->
len
]
=
'\0'
;
u_char
*
aux
=
ngx_http_push_stream_str_replace
(
template
->
data
,
token
->
data
,
text
->
data
,
0
,
temp_pool
);
u_char
*
aux
=
ngx_http_push_stream_str_replace
(
template
->
data
,
token
->
data
,
text
->
data
,
0
,
temp_pool
);
if
(
aux
==
NULL
)
{
if
(
aux
==
NULL
)
{
...
@@ -179,8 +177,8 @@ ngx_http_push_stream_apply_text_template(ngx_str_t **dst_value, ngx_str_t **dst_
...
@@ -179,8 +177,8 @@ ngx_http_push_stream_apply_text_template(ngx_str_t **dst_value, ngx_str_t **dst_
(
*
dst_message
)
->
len
=
chunk
->
len
;
(
*
dst_message
)
->
len
=
chunk
->
len
;
(
*
dst_message
)
->
data
=
(
u_char
*
)
((
*
dst_message
)
+
1
);
(
*
dst_message
)
->
data
=
(
u_char
*
)
((
*
dst_message
)
+
1
);
last
=
ngx_co
py
((
*
dst_message
)
->
data
,
chunk
->
data
,
(
*
dst_message
)
->
len
);
ngx_memc
py
((
*
dst_message
)
->
data
,
chunk
->
data
,
(
*
dst_message
)
->
len
);
*
last
=
'\0'
;
(
*
dst_message
)
->
data
[(
*
dst_message
)
->
len
]
=
'\0'
;
}
}
return
NGX_OK
;
return
NGX_OK
;
...
...
src/ngx_http_push_stream_rbtree_util.c
View file @
e588ef80
...
@@ -174,7 +174,6 @@ ngx_http_push_stream_get_channel(ngx_str_t *id, ngx_log_t *log, ngx_http_push_st
...
@@ -174,7 +174,6 @@ ngx_http_push_stream_get_channel(ngx_str_t *id, ngx_log_t *log, ngx_http_push_st
ngx_http_push_stream_channel_t
*
channel
;
ngx_http_push_stream_channel_t
*
channel
;
ngx_slab_pool_t
*
shpool
=
(
ngx_slab_pool_t
*
)
ngx_http_push_stream_shm_zone
->
shm
.
addr
;
ngx_slab_pool_t
*
shpool
=
(
ngx_slab_pool_t
*
)
ngx_http_push_stream_shm_zone
->
shm
.
addr
;
ngx_flag_t
is_broadcast_channel
=
0
;
ngx_flag_t
is_broadcast_channel
=
0
;
u_char
*
last
;
channel
=
ngx_http_push_stream_find_channel
(
id
,
log
);
channel
=
ngx_http_push_stream_find_channel
(
id
,
log
);
if
(
channel
!=
NULL
)
{
// we found our channel
if
(
channel
!=
NULL
)
{
// we found our channel
...
@@ -212,8 +211,8 @@ ngx_http_push_stream_get_channel(ngx_str_t *id, ngx_log_t *log, ngx_http_push_st
...
@@ -212,8 +211,8 @@ ngx_http_push_stream_get_channel(ngx_str_t *id, ngx_log_t *log, ngx_http_push_st
}
}
channel
->
id
.
len
=
id
->
len
;
channel
->
id
.
len
=
id
->
len
;
last
=
ngx_co
py
(
channel
->
id
.
data
,
id
->
data
,
channel
->
id
.
len
);
ngx_memc
py
(
channel
->
id
.
data
,
id
->
data
,
channel
->
id
.
len
);
*
last
=
'\0'
;
channel
->
id
.
data
[
channel
->
id
.
len
]
=
'\0'
;
channel
->
broadcast
=
is_broadcast_channel
;
channel
->
broadcast
=
is_broadcast_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