Mercurial > hg > nginx
comparison src/core/ngx_shmtx.c @ 4738:512c741fa841
Fixed typo in a function name.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 03 Jul 2012 13:06:40 +0000 |
parents | d620f497c50f |
children | 0fce5bb53b2d |
comparison
equal
deleted
inserted
replaced
4737:9acc1a5a5b9a | 4738:512c741fa841 |
---|---|
42 return NGX_OK; | 42 return NGX_OK; |
43 } | 43 } |
44 | 44 |
45 | 45 |
46 void | 46 void |
47 ngx_shmtx_destory(ngx_shmtx_t *mtx) | 47 ngx_shmtx_destroy(ngx_shmtx_t *mtx) |
48 { | 48 { |
49 #if (NGX_HAVE_POSIX_SEM) | 49 #if (NGX_HAVE_POSIX_SEM) |
50 | 50 |
51 if (mtx->semaphore) { | 51 if (mtx->semaphore) { |
52 if (sem_destroy(&mtx->sem) == -1) { | 52 if (sem_destroy(&mtx->sem) == -1) { |
206 if (ngx_strcmp(name, mtx->name) == 0) { | 206 if (ngx_strcmp(name, mtx->name) == 0) { |
207 mtx->name = name; | 207 mtx->name = name; |
208 return NGX_OK; | 208 return NGX_OK; |
209 } | 209 } |
210 | 210 |
211 ngx_shmtx_destory(mtx); | 211 ngx_shmtx_destroy(mtx); |
212 } | 212 } |
213 | 213 |
214 mtx->fd = ngx_open_file(name, NGX_FILE_RDWR, NGX_FILE_CREATE_OR_OPEN, | 214 mtx->fd = ngx_open_file(name, NGX_FILE_RDWR, NGX_FILE_CREATE_OR_OPEN, |
215 NGX_FILE_DEFAULT_ACCESS); | 215 NGX_FILE_DEFAULT_ACCESS); |
216 | 216 |
230 return NGX_OK; | 230 return NGX_OK; |
231 } | 231 } |
232 | 232 |
233 | 233 |
234 void | 234 void |
235 ngx_shmtx_destory(ngx_shmtx_t *mtx) | 235 ngx_shmtx_destroy(ngx_shmtx_t *mtx) |
236 { | 236 { |
237 if (ngx_close_file(mtx->fd) == NGX_FILE_ERROR) { | 237 if (ngx_close_file(mtx->fd) == NGX_FILE_ERROR) { |
238 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, ngx_errno, | 238 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, ngx_errno, |
239 ngx_close_file_n " \"%s\" failed", mtx->name); | 239 ngx_close_file_n " \"%s\" failed", mtx->name); |
240 } | 240 } |