From: Yann Ylavic Date: Mon, 14 Sep 2015 14:04:19 +0000 (+0000) Subject: mod_slotmem_shm: revert frivolous s/name/fname/ from r1702473, keep the comments. X-Git-Tag: 2.5.0-alpha~2845 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58abe4c55914ed464f9e8cced81c31c3cd45a6fa;p=apache mod_slotmem_shm: revert frivolous s/name/fname/ from r1702473, keep the comments. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702955 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c index d969b68878..bdf42bd4ef 100644 --- a/modules/slotmem/mod_slotmem_shm.c +++ b/modules/slotmem/mod_slotmem_shm.c @@ -42,7 +42,7 @@ typedef struct { #define AP_UNSIGNEDINT_OFFSET (APR_ALIGN_DEFAULT(sizeof(unsigned int))) struct ap_slotmem_instance_t { - char *fname; /* file based SHM path/name */ + char *name; /* file based SHM path/name */ char *pname; /* persisted file path/name */ int fbased; /* filebased? */ void *shm; /* ptr to memory segment (apr_shm_t *) */ @@ -275,8 +275,8 @@ static apr_status_t cleanup_slotmem(void *param) store_slotmem(next); } if (next->fbased) { - apr_shm_remove(next->fname, next->gpool); - apr_file_remove(next->fname, next->gpool); + apr_shm_remove(next->name, next->gpool); + apr_file_remove(next->name, next->gpool); } apr_shm_destroy((apr_shm_t *)next->shm); next = next->next; @@ -340,7 +340,7 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new, /* first try to attach to existing slotmem */ if (next) { for (;;) { - if (strcmp(next->fname, fname) == 0) { + if (strcmp(next->name, fname) == 0) { /* we already have it */ *new = next; ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02603) @@ -439,7 +439,7 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new, /* For the chained slotmem stuff */ res = (ap_slotmem_instance_t *) apr_pcalloc(gpool, sizeof(ap_slotmem_instance_t)); - res->fname = apr_pstrdup(gpool, fname); + res->name = apr_pstrdup(gpool, fname); res->pname = apr_pstrdup(gpool, pname); res->fbased = fbased; res->shm = shm; @@ -491,7 +491,7 @@ static apr_status_t slotmem_attach(ap_slotmem_instance_t **new, /* first try to attach to existing slotmem */ if (next) { for (;;) { - if (strcmp(next->fname, fname) == 0) { + if (strcmp(next->name, fname) == 0) { /* we already have it */ *new = next; *item_size = next->desc.size; @@ -523,7 +523,7 @@ static apr_status_t slotmem_attach(ap_slotmem_instance_t **new, /* For the chained slotmem stuff */ res = (ap_slotmem_instance_t *) apr_pcalloc(gpool, sizeof(ap_slotmem_instance_t)); - res->fname = apr_pstrdup(gpool, fname); + res->name = apr_pstrdup(gpool, fname); res->fbased = 1; res->shm = shm; res->num_free = (unsigned int *)ptr; @@ -669,7 +669,7 @@ static apr_status_t slotmem_grab(ap_slotmem_instance_t *slot, unsigned int *id) if (i >= slot->desc.num) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02293) "slotmem(%s) grab failed. Num %u/num_free %u", - slot->fname, slotmem_num_slots(slot), + slot->name, slotmem_num_slots(slot), slotmem_num_free_slots(slot)); return APR_EINVAL; } @@ -690,7 +690,7 @@ static apr_status_t slotmem_fgrab(ap_slotmem_instance_t *slot, unsigned int id) if (id >= slot->desc.num) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02397) "slotmem(%s) fgrab failed. Num %u/num_free %u", - slot->fname, slotmem_num_slots(slot), + slot->name, slotmem_num_slots(slot), slotmem_num_free_slots(slot)); return APR_EINVAL; } @@ -717,7 +717,7 @@ static apr_status_t slotmem_release(ap_slotmem_instance_t *slot, if (id >= slot->desc.num || !inuse[id] ) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02294) "slotmem(%s) release failed. Num %u/inuse[%u] %d", - slot->fname, slotmem_num_slots(slot), + slot->name, slotmem_num_slots(slot), id, (int)inuse[id]); if (id >= slot->desc.num) { return APR_EINVAL;