const digest_config_rec *conf)
{
char *nonce = apr_palloc(p, NONCE_LEN+1);
- int len;
time_rec t;
if (conf->nonce_lifetime != 0) {
/* XXX: WHAT IS THIS CONSTANT? */
t.time = 42;
}
- len = apr_base64_encode_binary(nonce, t.arr, sizeof(t.arr));
+ apr_base64_encode_binary(nonce, t.arr, sizeof(t.arr));
gen_nonce_hash(nonce+NONCE_TIME_LEN, nonce, opaque, server, conf);
return nonce;
const digest_config_rec *conf)
{
apr_time_t dt;
- int len;
time_rec nonce_time;
char tmp, hash[NONCE_HASH_LEN+1];
tmp = resp->nonce[NONCE_TIME_LEN];
resp->nonce[NONCE_TIME_LEN] = '\0';
- len = apr_base64_decode_binary(nonce_time.arr, resp->nonce);
+ apr_base64_decode_binary(nonce_time.arr, resp->nonce);
gen_nonce_hash(hash, resp->nonce, resp->opaque, r->server, conf);
resp->nonce[NONCE_TIME_LEN] = tmp;
resp->nonce_time = nonce_time.time;
#include "mod_dav.h"
#include "repos.h"
+#include "http_log.h"
+#include "http_main.h" /* for ap_server_conf */
struct dav_db {
memcpy(db->ns_table.buf, &m, sizeof(m));
err = dav_dbm_store(db, key, value);
- /* ### what to do with the error? */
+ if (err != NULL)
+ ap_log_error(APLOG_MARK, APLOG_WARNING, err->aprerr,
+ ap_server_conf, "Error writing propdb: %s", err->desc);
}
dav_dbm_close(db);
*/
static int x_pre_connection(conn_rec *c, void *csd)
{
- x_cfg *cfg;
char *note;
- cfg = our_cconfig(c);
-
/*
* Log the call and exit.
*/
*/
static int x_process_connection(conn_rec *c)
{
- x_cfg *cfg;
- cfg = our_cconfig(c);
-
trace_connection(c, "x_process_connection()");
return DECLINED;
request_rec *rr = NULL;
const char *error = "Invalid expression \"%s\" in file %s";
const char *parse = expr;
- int was_unmatched = 0;
unsigned regex = 0;
*was_error = 0;
*/
CREATE_NODE(ctx, new);
- was_unmatched = get_ptoken(ctx, &parse, &new->token,
- (current != NULL ? ¤t->token : NULL));
- if (!parse) {
- break;
- }
+ {
+#ifdef DEBUG_INCLUDE
+ int was_unmatched =
+#endif
+ get_ptoken(ctx, &parse, &new->token,
+ (current != NULL ? ¤t->token : NULL));
+ if (!parse)
+ break;
- DEBUG_DUMP_UNMATCHED(ctx, was_unmatched);
- DEBUG_DUMP_TOKEN(ctx, &new->token);
+ DEBUG_DUMP_UNMATCHED(ctx, was_unmatched);
+ DEBUG_DUMP_TOKEN(ctx, &new->token);
+ }
if (!current) {
switch (new->token.type) {
len += strl[i] = strlen(strs[i]);
}
if (!log_writer) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r,
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"log writer isn't correctly setup");
return HTTP_INTERNAL_SERVER_ERROR;
}
rv = log_writer(r, cls->log_writer, strs, strl, format->nelts, len);
- /* xxx: do we return an error on log_writer? */
+ if (rv != APR_SUCCESS)
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, "Error writing to %s",
+ cls->fname);
return OK;
}
serf_bucket_headers_setn(hdrs_bkt, "Accept-Encoding", "gzip");
if (ctx->want_ssl) {
- serf_bucket_alloc_t *req_alloc;
-
- req_alloc = serf_request_get_alloc(request);
-
if (ctx->ssl_ctx == NULL) {
*req_bkt = serf_bucket_ssl_encrypt_create(*req_bkt, NULL,
ctx->bkt_alloc);
/* XXXXX: make persistent/per-process or something.*/
serf_context_t *serfme;
serf_connection_t *conn;
- serf_request_t *srequest;
serf_server_config_t *ctx =
(serf_server_config_t *)ap_get_module_config(r->server->module_config,
&serf_module);
closed_connection, baton,
pool);
- srequest = serf_connection_request_create(conn, setup_request,
- baton);
+ /* XXX: Is it correct that we don't use the returned serf_request_t? */
+ serf_connection_request_create(conn, setup_request, baton);
if (mpm_supprts_serf) {
return SUSPENDED;
case 'p':
if (method != NO_METH)
err("Cannot mix POST with other methods\n");
- if ((status = open_postfile(opt_arg)) != APR_SUCCESS) {
+ if (open_postfile(opt_arg) != APR_SUCCESS) {
exit(1);
}
method = POST;
case 'u':
if (method != NO_METH)
err("Cannot mix PUT with other methods\n");
- if ((status = open_postfile(opt_arg)) != APR_SUCCESS) {
+ if (open_postfile(opt_arg) != APR_SUCCESS) {
exit(1);
}
method = PUT;