* limitations under the License.
*/
#include "mod_chxj.h"
+#include "ap_regex.h"
static device_table UNKNOWN_DEVICE = {
NULL, "","UNKNOWN", CHXJ_SPEC_UNKNOWN, 0, 0,0,0,0,0,0,0, ""};
device_table*
chxj_specified_device(request_rec* r, const char* user_agent)
{
- regex_t *regexp;
- regmatch_t match[10];
+ ap_regex_t *regexp;
+ ap_regmatch_t match[10];
device_table *returnType = &UNKNOWN_DEVICE;
device_table_list* dtl;
device_table* dt;
{
continue;
}
- regexp = ap_pregcomp(r->pool, (const char*)dtl->pattern, REG_EXTENDED|REG_ICASE);
+ regexp = ap_pregcomp(r->pool, (const char*)dtl->pattern, AP_REG_EXTENDED|AP_REG_ICASE);
if (regexp == NULL)
{
return returnType;
{
server_rec *base_server = (server_rec *)data;
mod_chxj_global_config* conf;
+ void* param;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, base_server,
"start chxj_init_module_kill()");
}
static mod_chxj_global_config*
-chxj_global_config_create(server_rec* s)
+chxj_global_config_create(apr_pool_t* pool, server_rec* s)
{
apr_status_t sts;
- apr_pool_t *pool = s->process->pool;
void* shm_segment;
apr_size_t shm_segsize;
int* shm;
apr_pool_userdata_get(¶m, CHXJ_MOD_CONFIG_KEY, pool);
conf = (mod_chxj_global_config*)param;
-
apr_pool_cleanup_register(pool, s,
chxj_init_module_kill,
- chxj_init_module_kill);
+ apr_pool_cleanup_null);
if (conf)
{
/*------------------------------------------------------------------------*/
apr_pool_t *ptemp,
server_rec *s)
{
- mod_chxj_global_config* conf;
-
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
"start chxj_init_module()");
- conf = chxj_global_config_create(s);
-
ap_add_version_component(p, CHXJ_VERSION_PREFIX CHXJ_VERSION);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
{
mod_chxj_global_config *gc;
- gc = chxj_global_config_create(s);
+ gc = chxj_global_config_create(p,s);
return gc;
}
+static int chxj_convert_images(request_rec *r)
+{
+ ap_log_rerror(APLOG_MARK,APLOG_DEBUG, 0, r, "chxj_convert_images Yahoo!![%s]", r->the_request);
+
+ if (strcasecmp(r->handler, "keitai-picture"))
+ {
+ return DECLINED;
+ }
+ return DECLINED;
+}
+
/**
* The hook is registered.
*
chxj_input_filter,
NULL,
AP_FTYPE_RESOURCE);
-#if 0
- AP_FTYPE_CONNECTION);
- AP_FTYPE_PROTOCOL);
-#endif
+ ap_hook_handler(chxj_convert_images, NULL, NULL, APR_HOOK_MIDDLE);
}
/**