Changeset 5229ef1f0c47697846621aa99c2b3836b192a769 for src/modules
- Timestamp:
- 02/04/08 20:05:24 (5 years ago)
- git-parent:
- Files:
-
- src/modules/http.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/modules/http.c
ra2e53dc r5229ef1 107 107 static int serf_config(noit_module_t *self, noit_hash_table *options) { 108 108 serf_module_conf_t *conf; 109 conf = calloc(1, sizeof(*conf)); 109 conf = noit_module_get_userdata(self); 110 if(conf) { 111 if(conf->options) { 112 noit_hash_destroy(conf->options, free, free); 113 free(conf->options); 114 } 115 } 116 else 117 conf = calloc(1, sizeof(*conf)); 110 118 conf->options = options; 111 119 conf->results = serf_log_results; … … 115 123 static int resmon_config(noit_module_t *self, noit_hash_table *options) { 116 124 serf_module_conf_t *conf; 117 conf = calloc(1, sizeof(*conf)); 125 conf = noit_module_get_userdata(self); 126 if(conf) { 127 if(conf->options) { 128 noit_hash_destroy(conf->options, free, free); 129 free(conf->options); 130 } 131 } 132 else 133 conf = calloc(1, sizeof(*conf)); 118 134 conf->options = options; 119 135 if(!conf->options) conf->options = calloc(1, sizeof(*conf->options)); … … 161 177 current.status = human_buffer; 162 178 if(current.available == NP_AVAILABLE) { 163 noit_stats_set_metric_ int(¤t, "code", &ci->status.code);179 noit_stats_set_metric_string(¤t, "code", ci->status.code?code:NULL); 164 180 noit_stats_set_metric_int(¤t, "bytes", &ci->body.l); 165 181 } … … 688 704 689 705 ci->handler_ctx.method = apr_pstrdup(ci->pool, "GET"); 690 ci->handler_ctx.host = apr_pstrdup(ci->pool, c heck->target);706 ci->handler_ctx.host = apr_pstrdup(ci->pool, ci->url.hostname); 691 707 ci->handler_ctx.path = ci->url.path; 692 708 ci->handler_ctx.authn = NULL;
