From 0c5c1bb0d0a3efe9ba96784cc5bc58c174db562e Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Wed, 05 May 2004 21:38:29 +0000 Subject: changed strstr to ap_strstr or ap_strstr_c changed strchr to ap_strchr or ap_strchr_c --- diff --git a/apache13.h b/apache13.h index bf10af2..ab56113 100644 --- a/apache13.h +++ b/apache13.h @@ -60,6 +60,8 @@ #define apr_pstrcat ap_pstrcat #define apr_psprintf ap_psprintf #define apr_snprintf ap_snprintf +#define ap_strchr strchr +#define ap_strstr strstr #define apr_table_set ap_table_set #define apr_table_get ap_table_get diff --git a/functions.h b/functions.h index 7281588..dcbc939 100644 --- a/functions.h +++ b/functions.h @@ -185,7 +185,7 @@ static const char *extract_specific_cookie(request_rec *r, char *a) log_error(APLOG_MARK,APLOG_DEBUG, 0, r->server, "Cookie2: [%s]", cookiestr); /* Does the cookie string contain one with our name? */ - isvalid = strstr(cookiestr, a); + isvalid = ap_strstr_c(cookiestr, a); if (isvalid != NULL) { /* Move past the cookie name and equal sign */ isvalid += strlen(a) + 1; @@ -193,7 +193,7 @@ static const char *extract_specific_cookie(request_rec *r, char *a) cookiebuf = apr_pstrdup(r->pool, isvalid); /* Segregate just this cookie out of the string * with a terminating nul at the first semicolon */ - cookieend = strchr(cookiebuf, ';'); + cookieend = ap_strchr(cookiebuf, ';'); if (cookieend != NULL) *cookieend = '\0'; return cookiebuf; @@ -204,11 +204,11 @@ static const char *extract_specific_cookie(request_rec *r, char *a) if (cookiestr != NULL) { log_error(APLOG_MARK,APLOG_DEBUG, 0, r->server, "Cookie: [%s]", cookiestr); - isvalid = strstr(cookiestr, a); + isvalid = ap_strstr_c(cookiestr, a); if (isvalid != NULL) { isvalid += strlen(a) + 1; cookiebuf = apr_pstrdup(r->pool, isvalid); - cookieend = strchr(cookiebuf, ';'); + cookieend = ap_strchr(cookiebuf, ';'); if (cookieend != NULL) *cookieend = '\0'; return cookiebuf; @@ -219,11 +219,11 @@ static const char *extract_specific_cookie(request_rec *r, char *a) if (cookiestr != NULL) { log_error(APLOG_MARK,APLOG_DEBUG, 0, r->server, "Set-Cookie: [%s]", cookiestr); - isvalid = strstr(cookiestr, a); + isvalid = ap_strstr_c(cookiestr, a); if (isvalid != NULL) { isvalid += strlen(a) + 1; cookiebuf = apr_pstrdup(r->pool, isvalid); - cookieend = strchr(cookiebuf, ';'); + cookieend = ap_strchr(cookiebuf, ';'); if (cookieend != NULL) *cookieend = '\0'; return cookiebuf; diff --git a/mod_log_sql.c b/mod_log_sql.c index 294380b..fc9dcc0 100644 --- a/mod_log_sql.c +++ b/mod_log_sql.c @@ -128,7 +128,7 @@ LOGSQL_DECLARE(void) log_sql_register_item(server_rec *s, apr_pool_t *p, char *pos; if (cfg->transfer_log_format) { - if ( (pos = strchr(cfg->transfer_log_format,key))!=NULL) { + if ( (pos = ap_strchr_c(cfg->transfer_log_format,key))!=NULL) { cfg->parsed_log_format[pos - cfg->transfer_log_format] = item; } } @@ -373,7 +373,7 @@ static const char *set_log_sql_info(cmd_parms *cmd, void *dummy, } if (uri.path) { /* extract Database name */ - char *off = strchr(++uri.path,'/'); + char *off = ap_strchr(++uri.path,'/'); if (off) *off='\0'; set_dbparam(cmd, NULL, "database", uri.path); @@ -850,7 +850,7 @@ static int log_sql_transaction(request_rec *orig) if ((r->uri) && (cls->transfer_accept_list->nelts)) { proceed = 0; for (ptrptr = (char **) cls->transfer_accept_list->elts; ptrptr < ptrptr2; ptrptr = (char **) ((char *) ptrptr + cls->transfer_accept_list->elt_size)) - if (strstr(r->uri, *ptrptr)) { + if (ap_strstr(r->uri, *ptrptr)) { proceed = 1; break; } @@ -863,7 +863,7 @@ static int log_sql_transaction(request_rec *orig) ptrptr2 = (char **) (cls->transfer_ignore_list->elts + (cls->transfer_ignore_list->nelts * cls->transfer_ignore_list->elt_size)); if (r->uri) { for (ptrptr = (char **) cls->transfer_ignore_list->elts; ptrptr < ptrptr2; ptrptr = (char **) ((char *) ptrptr + cls->transfer_ignore_list->elt_size)) - if (strstr(r->uri, *ptrptr)) { + if (ap_strstr(r->uri, *ptrptr)) { return OK; } } @@ -874,7 +874,7 @@ static int log_sql_transaction(request_rec *orig) thehost = ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME, NULL); if (thehost) { for (ptrptr = (char **) cls->remhost_ignore_list->elts; ptrptr < ptrptr2; ptrptr = (char **) ((char *) ptrptr + cls->remhost_ignore_list->elt_size)) - if (strstr(thehost, *ptrptr)) { + if (ap_strstr(thehost, *ptrptr)) { return OK; } } -- cgit v0.9.2