cbd->stage = map_finished;
}
- msg_warn_map ("connection with http server is terminated: worker is stopping");
+ msg_warn_map ("%s: "
+ "connection with http server is terminated: worker is stopping",
+ map->name);
}
map = cbd->map;
cbd->periodic->errored = TRUE;
- msg_err_map ("connection with http server terminated incorrectly: %e", err);
+ msg_err_map ("error reading %s(%s): "
+ "connection with http server terminated incorrectly: %e",
+ map->name, cbd->bk->uri, err);
rspamd_map_periodic_callback (-1, EV_TIMEOUT, cbd->periodic);
MAP_RELEASE (cbd, "http_callback_data");
}
gsize len;
if (map->read_callback == NULL || map->fin_callback == NULL) {
- msg_err_map ("bad callback for reading map file");
+ msg_err_map ("%s: bad callback for reading map file",
+ data->filename);
return FALSE;
}
if (access (data->filename, R_OK) == -1) {
/* File does not exist, skipping */
- msg_err_map ("map file is unavailable for reading");
+ msg_err_map ("%s: map file is unavailable for reading",
+ data->filename);
return TRUE;
}
r = ZSTD_decompressStream (zstream, &zout, &zin);
if (ZSTD_isError (r)) {
- msg_err_map ("cannot decompress data: %s",
+ msg_err_map ("%s: cannot decompress data: %s",
+ data->filename,
ZSTD_getErrorName (r));
ZSTD_freeDStream (zstream);
g_free (out);
gsize len;
if (map->read_callback == NULL || map->fin_callback == NULL) {
- msg_err_map ("bad callback for reading map file");
+ msg_err_map ("%s: bad callback for reading map file", map->name);
data->processed = TRUE;
return FALSE;
}
r = ZSTD_decompressStream (zstream, &zout, &zin);
if (ZSTD_isError (r)) {
- msg_err_map ("cannot decompress data: %s",
+ msg_err_map ("%s: cannot decompress data: %s",
+ map->name,
ZSTD_getErrorName (r));
ZSTD_freeDStream (zstream);
g_free (out);
}
ZSTD_freeDStream (zstream);
- msg_info_map ("read map data from static memory (%z bytes compressed, "
- "%z uncompressed)",
+ msg_info_map ("%s: read map data from static memory (%z bytes compressed, "
+ "%z uncompressed)", map->name,
len, zout.pos);
map->read_callback (out, zout.pos, &periodic->cbdata, TRUE);
g_free (out);
}
else {
- msg_info_map ("read map data from static memory (%z bytes)",
- len);
+ msg_info_map ("%s: read map data from static memory (%z bytes)",
+ len, map->name);
map->read_callback (bytes, len, &periodic->cbdata, TRUE);
}
}