"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gstorage.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").

gstorage.c  (goaccess-1.6.5):gstorage.c  (goaccess-1.7)
skipping to change at line 73 skipping to change at line 73
static int gen_remote_user_key (GKeyData * kdata, GLogItem * logitem); static int gen_remote_user_key (GKeyData * kdata, GLogItem * logitem);
static int gen_cache_status_key (GKeyData * kdata, GLogItem * logitem); static int gen_cache_status_key (GKeyData * kdata, GLogItem * logitem);
static int gen_referer_key (GKeyData * kdata, GLogItem * logitem); static int gen_referer_key (GKeyData * kdata, GLogItem * logitem);
static int gen_ref_site_key (GKeyData * kdata, GLogItem * logitem); static int gen_ref_site_key (GKeyData * kdata, GLogItem * logitem);
static int gen_request_key (GKeyData * kdata, GLogItem * logitem); static int gen_request_key (GKeyData * kdata, GLogItem * logitem);
static int gen_static_request_key (GKeyData * kdata, GLogItem * logitem); static int gen_static_request_key (GKeyData * kdata, GLogItem * logitem);
static int gen_status_code_key (GKeyData * kdata, GLogItem * logitem); static int gen_status_code_key (GKeyData * kdata, GLogItem * logitem);
static int gen_visit_time_key (GKeyData * kdata, GLogItem * logitem); static int gen_visit_time_key (GKeyData * kdata, GLogItem * logitem);
#ifdef HAVE_GEOLOCATION #ifdef HAVE_GEOLOCATION
static int gen_geolocation_key (GKeyData * kdata, GLogItem * logitem); static int gen_geolocation_key (GKeyData * kdata, GLogItem * logitem);
static int gen_asn_key (GKeyData * kdata, GLogItem * logitem);
#endif #endif
/* UMS */ /* UMS */
static int gen_mime_type_key (GKeyData * kdata, GLogItem * logitem); static int gen_mime_type_key (GKeyData * kdata, GLogItem * logitem);
static int gen_tls_type_key (GKeyData * kdata, GLogItem * logitem); static int gen_tls_type_key (GKeyData * kdata, GLogItem * logitem);
/* insertion metric routines */ /* insertion metric routines */
static void insert_data (GModule module, GKeyData * kdata); static void insert_data (GModule module, GKeyData * kdata);
static void insert_rootmap (GModule module, GKeyData * kdata); static void insert_rootmap (GModule module, GKeyData * kdata);
static void insert_root (GModule module, GKeyData * kdata); static void insert_root (GModule module, GKeyData * kdata);
static void insert_hit (GModule module, GKeyData * kdata); static void insert_hit (GModule module, GKeyData * kdata);
skipping to change at line 280 skipping to change at line 281
insert_rootmap, insert_rootmap,
insert_hit, insert_hit,
insert_visitor, insert_visitor,
insert_bw, insert_bw,
insert_cumts, insert_cumts,
insert_maxts, insert_maxts,
NULL, NULL,
NULL, NULL,
NULL, NULL,
}, },
{
ASN,
gen_asn_key,
insert_data,
NULL,
insert_hit,
insert_visitor,
insert_bw,
insert_cumts,
insert_maxts,
NULL,
NULL,
NULL,
},
#endif #endif
{ {
STATUS_CODES, STATUS_CODES,
gen_status_code_key, gen_status_code_key,
insert_data, insert_data,
insert_rootmap, insert_rootmap,
insert_hit, insert_hit,
insert_visitor, insert_visitor,
insert_bw, insert_bw,
insert_cumts, insert_cumts,
skipping to change at line 1010 skipping to change at line 1025
void void
set_browser_os (GLogItem * logitem) { set_browser_os (GLogItem * logitem) {
char *a1 = xstrdup (logitem->agent), *a2 = xstrdup (logitem->agent); char *a1 = xstrdup (logitem->agent), *a2 = xstrdup (logitem->agent);
char browser_type[BROWSER_TYPE_LEN] = ""; char browser_type[BROWSER_TYPE_LEN] = "";
char os_type[OPESYS_TYPE_LEN] = ""; char os_type[OPESYS_TYPE_LEN] = "";
logitem->browser = verify_browser (a1, browser_type); logitem->browser = verify_browser (a1, browser_type);
logitem->browser_type = xstrdup (browser_type); logitem->browser_type = xstrdup (browser_type);
if (!memcmp (logitem->browser_type, "Crawlers", 8)) { if (!memcmp (logitem->browser_type, "Crawlers", 8)) {
logitem->os = xstrdup(logitem->browser); logitem->os = xstrdup (logitem->browser);
logitem->os_type = xstrdup (browser_type); logitem->os_type = xstrdup (browser_type);
} else { } else {
logitem->os = verify_os (a2, os_type); logitem->os = verify_os (a2, os_type);
logitem->os_type = xstrdup (os_type); logitem->os_type = xstrdup (os_type);
} }
free (a1); free (a1);
free (a2); free (a2);
} }
skipping to change at line 1274 skipping to change at line 1289
if (continent[0] != '\0') if (continent[0] != '\0')
logitem->continent = xstrdup (continent); logitem->continent = xstrdup (continent);
get_kdata (kdata, logitem->country, logitem->country); get_kdata (kdata, logitem->country, logitem->country);
get_kroot (kdata, logitem->continent, logitem->continent); get_kroot (kdata, logitem->continent, logitem->continent);
kdata->numdate = logitem->numdate; kdata->numdate = logitem->numdate;
return 0; return 0;
} }
/* A wrapper to generate a unique key for the ASN panel.
*
* On error, 1 is returned.
* On success, the generated keyphrase key is assigned to our key data
* structure. */
static int
gen_asn_key (GKeyData * kdata, GLogItem * logitem) {
char asn[ASN_LEN] = "";
if (!is_geoip_resource ())
return 1;
geoip_asn (logitem->host, asn);
if (asn[0] != '\0')
logitem->asn = xstrdup (asn);
get_kdata (kdata, logitem->asn, logitem->asn);
kdata->numdate = logitem->numdate;
return 0;
}
#endif #endif
/* A wrapper to generate a unique key for the status code panel. /* A wrapper to generate a unique key for the status code panel.
* *
* On error, 1 is returned. * On error, 1 is returned.
* On success, the generated status code key is assigned to our key * On success, the generated status code key is assigned to our key
* data structure. */ * data structure. */
static int static int
gen_status_code_key (GKeyData * kdata, GLogItem * logitem) { gen_status_code_key (GKeyData * kdata, GLogItem * logitem) {
const char *status = NULL, *type = NULL; const char *status = NULL, *type = NULL;
 End of changes. 4 change blocks. 
1 lines changed or deleted 39 lines changed or added

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