@@ -102,7 +102,7 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
102
102
#if (NGX_HAVE_UNIX_DOMAIN )
103
103
ngx_rtmp_auto_push_conf_t * apcf ;
104
104
ngx_listening_t * ls , * lss ;
105
- struct sockaddr_un * sun ;
105
+ struct sockaddr_un * saun ;
106
106
int reuseaddr ;
107
107
ngx_socket_t s ;
108
108
size_t n ;
@@ -157,26 +157,26 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
157
157
ls -> addr_ntop = 0 ;
158
158
159
159
ls -> socklen = sizeof (struct sockaddr_un );
160
- sun = ngx_pcalloc (cycle -> pool , ls -> socklen );
161
- ls -> sockaddr = (struct sockaddr * ) sun ;
160
+ saun = ngx_pcalloc (cycle -> pool , ls -> socklen );
161
+ ls -> sockaddr = (struct sockaddr * ) saun ;
162
162
if (ls -> sockaddr == NULL ) {
163
163
return NGX_ERROR ;
164
164
}
165
- sun -> sun_family = AF_UNIX ;
166
- * ngx_snprintf ((u_char * ) sun -> sun_path , sizeof (sun -> sun_path ),
165
+ saun -> sun_family = AF_UNIX ;
166
+ * ngx_snprintf ((u_char * ) saun -> sun_path , sizeof (saun -> sun_path ),
167
167
"%V/" NGX_RTMP_AUTO_PUSH_SOCKNAME ".%i" ,
168
168
& apcf -> socket_dir , ngx_process_slot )
169
169
= 0 ;
170
170
171
171
ngx_log_debug1 (NGX_LOG_DEBUG_RTMP , cycle -> log , 0 ,
172
172
"auto_push: create socket '%s'" ,
173
- sun -> sun_path );
173
+ saun -> sun_path );
174
174
175
- if (ngx_file_info (sun -> sun_path , & fi ) != ENOENT ) {
175
+ if (ngx_file_info (saun -> sun_path , & fi ) != ENOENT ) {
176
176
ngx_log_debug1 (NGX_LOG_DEBUG_RTMP , cycle -> log , 0 ,
177
177
"auto_push: delete existing socket '%s'" ,
178
- sun -> sun_path );
179
- ngx_delete_file (sun -> sun_path );
178
+ saun -> sun_path );
179
+ ngx_delete_file (saun -> sun_path );
180
180
}
181
181
182
182
ngx_str_set (& ls -> addr_text , "worker_socket" );
@@ -205,7 +205,7 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
205
205
}
206
206
}
207
207
208
- if (bind (s , (struct sockaddr * ) sun , sizeof (* sun )) == -1 ) {
208
+ if (bind (s , (struct sockaddr * ) saun , sizeof (* saun )) == -1 ) {
209
209
ngx_log_error (NGX_LOG_EMERG , cycle -> log , ngx_socket_errno ,
210
210
ngx_nonblocking_n " worker_socket bind failed" );
211
211
goto sock_error ;
@@ -228,7 +228,7 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
228
228
ngx_log_error (NGX_LOG_EMERG , cycle -> log , ngx_socket_errno ,
229
229
ngx_close_socket_n " worker_socket failed" );
230
230
}
231
- ngx_delete_file (sun -> sun_path );
231
+ ngx_delete_file (saun -> sun_path );
232
232
233
233
return NGX_ERROR ;
234
234
0 commit comments