"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gholder.c" between
goaccess-1.6.5.tar.gz and goaccess-1.7.tar.gz

About: GoAccess is a real-time web log analyzer and interactive viewer ("text-based").

gholder.c  (goaccess-1.6.5):gholder.c  (goaccess-1.7)
skipping to change at line 81 skipping to change at line 81
{VISIT_TIMES , add_data_to_holder , NULL}, {VISIT_TIMES , add_data_to_holder , NULL},
{VIRTUAL_HOSTS , add_data_to_holder , NULL}, {VIRTUAL_HOSTS , add_data_to_holder , NULL},
{REFERRERS , add_data_to_holder , NULL}, {REFERRERS , add_data_to_holder , NULL},
{REFERRING_SITES , add_data_to_holder , NULL}, {REFERRING_SITES , add_data_to_holder , NULL},
{KEYPHRASES , add_data_to_holder , NULL}, {KEYPHRASES , add_data_to_holder , NULL},
{STATUS_CODES , add_root_to_holder , NULL}, {STATUS_CODES , add_root_to_holder , NULL},
{REMOTE_USER , add_data_to_holder , NULL}, {REMOTE_USER , add_data_to_holder , NULL},
{CACHE_STATUS , add_data_to_holder , NULL}, {CACHE_STATUS , add_data_to_holder , NULL},
#ifdef HAVE_GEOLOCATION #ifdef HAVE_GEOLOCATION
{GEO_LOCATION , add_root_to_holder , NULL}, {GEO_LOCATION , add_root_to_holder , NULL},
{ASN , add_data_to_holder , NULL} ,
#endif #endif
{MIME_TYPE , add_root_to_holder, NULL} , {MIME_TYPE , add_root_to_holder , NULL} ,
{TLS_TYPE , add_root_to_holder, NULL} , {TLS_TYPE , add_root_to_holder , NULL} ,
}; };
/* *INDENT-ON* */ /* *INDENT-ON* */
/* Get a panel from the GPanel structure given a module. /* Get a panel from the GPanel structure given a module.
* *
* On error, or if not found, NULL is returned. * On error, or if not found, NULL is returned.
* On success, the panel value is returned. */ * On success, the panel value is returned. */
static GPanel * static GPanel *
panel_lookup (GModule module) { panel_lookup (GModule module) {
int i, num_panels = ARRAY_SIZE (paneling); int i, num_panels = ARRAY_SIZE (paneling);
skipping to change at line 334 skipping to change at line 335
/* Set host panel data, including sub items. /* Set host panel data, including sub items.
* *
* On success, the host panel data is set. */ * On success, the host panel data is set. */
static void static void
set_host_sub_list (GHolder * h, GSubList * sub_list) { set_host_sub_list (GHolder * h, GSubList * sub_list) {
GMetrics *nmetrics; GMetrics *nmetrics;
#ifdef HAVE_GEOLOCATION #ifdef HAVE_GEOLOCATION
char city[CITY_LEN] = ""; char city[CITY_LEN] = "";
char continent[CONTINENT_LEN] = ""; char continent[CONTINENT_LEN] = "";
char country[COUNTRY_LEN] = ""; char country[ASN_LEN] = "";
char asn[ASN_LEN] = "";
#endif #endif
char *host = h->items[h->idx].metrics->data, *hostname = NULL; char *host = h->items[h->idx].metrics->data, *hostname = NULL;
#ifdef HAVE_GEOLOCATION #ifdef HAVE_GEOLOCATION
/* add geolocation child nodes */ /* add geolocation child nodes */
set_geolocation (host, continent, country, city); set_geolocation (host, continent, country, city, asn);
/* country */ /* country */
if (country[0] != '\0') { if (country[0] != '\0') {
set_host_child_metrics (country, MTRC_ID_COUNTRY, &nmetrics); set_host_child_metrics (country, MTRC_ID_COUNTRY, &nmetrics);
add_sub_item_back (sub_list, h->module, nmetrics); add_sub_item_back (sub_list, h->module, nmetrics);
h->items[h->idx].sub_list = sub_list; h->items[h->idx].sub_list = sub_list;
h->sub_items_size++; h->sub_items_size++;
/* flag only */ /* flag only */
conf.has_geocountry = 1; conf.has_geocountry = 1;
skipping to change at line 363 skipping to change at line 365
/* city */ /* city */
if (city[0] != '\0') { if (city[0] != '\0') {
set_host_child_metrics (city, MTRC_ID_CITY, &nmetrics); set_host_child_metrics (city, MTRC_ID_CITY, &nmetrics);
add_sub_item_back (sub_list, h->module, nmetrics); add_sub_item_back (sub_list, h->module, nmetrics);
h->items[h->idx].sub_list = sub_list; h->items[h->idx].sub_list = sub_list;
h->sub_items_size++; h->sub_items_size++;
/* flag only */ /* flag only */
conf.has_geocity = 1; conf.has_geocity = 1;
} }
/* ASN */
if (asn[0] != '\0') {
set_host_child_metrics (asn, MTRC_ID_ASN, &nmetrics);
add_sub_item_back (sub_list, h->module, nmetrics);
h->items[h->idx].sub_list = sub_list;
h->sub_items_size++;
/* flag only */
conf.has_geoasn = 1;
}
#endif #endif
/* hostname */ /* hostname */
if (conf.enable_html_resolver && conf.output_stdout && !conf.no_ip_validation && if (conf.enable_html_resolver && conf.output_stdout && !conf.no_ip_validation &&
!conf.real_time_html) { !conf.real_time_html) {
hostname = reverse_ip (host); hostname = reverse_ip (host);
set_host_child_metrics (hostname, MTRC_ID_HOSTNAME, &nmetrics); set_host_child_metrics (hostname, MTRC_ID_HOSTNAME, &nmetrics);
add_sub_item_back (sub_list, h->module, nmetrics); add_sub_item_back (sub_list, h->module, nmetrics);
h->items[h->idx].sub_list = sub_list; h->items[h->idx].sub_list = sub_list;
h->sub_items_size++; h->sub_items_size++;
 End of changes. 5 change blocks. 
4 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)