"Fossies" - the Fresh Open Source Software Archive  

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

goaccess.c  (goaccess-1.6.5):goaccess.c  (goaccess-1.7)
skipping to change at line 126 skipping to change at line 126
{0, 0}, /* VISIT_TIMES { scroll, offset} */ {0, 0}, /* VISIT_TIMES { scroll, offset} */
{0, 0}, /* VIRTUAL_HOSTS { scroll, offset} */ {0, 0}, /* VIRTUAL_HOSTS { scroll, offset} */
{0, 0}, /* REFERRERS { scroll, offset} */ {0, 0}, /* REFERRERS { scroll, offset} */
{0, 0}, /* REFERRING_SITES { scroll, offset} */ {0, 0}, /* REFERRING_SITES { scroll, offset} */
{0, 0}, /* KEYPHRASES { scroll, offset} */ {0, 0}, /* KEYPHRASES { scroll, offset} */
{0, 0}, /* STATUS_CODES { scroll, offset} */ {0, 0}, /* STATUS_CODES { scroll, offset} */
{0, 0}, /* REMOTE_USER { scroll, offset} */ {0, 0}, /* REMOTE_USER { scroll, offset} */
{0, 0}, /* CACHE_STATUS { scroll, offset} */ {0, 0}, /* CACHE_STATUS { scroll, offset} */
#ifdef HAVE_GEOLOCATION #ifdef HAVE_GEOLOCATION
{0, 0}, /* GEO_LOCATION { scroll, offset} */ {0, 0}, /* GEO_LOCATION { scroll, offset} */
{0, 0}, /* ASN { scroll, offset} */
#endif #endif
{0, 0}, /* MIME_TYPE { scroll, offset} */ {0, 0}, /* MIME_TYPE { scroll, offset} */
{0, 0}, /* TLS_TYPE { scroll, offset} */ {0, 0}, /* TLS_TYPE { scroll, offset} */
}, },
0, /* current module */ 0, /* current module */
0, /* main dashboard scroll */ 0, /* main dashboard scroll */
0, /* expanded flag */ 0, /* expanded flag */
}; };
/* *INDENT-ON* */ /* *INDENT-ON* */
skipping to change at line 501 skipping to change at line 502
gscroll.module[gscroll.current].offset = offset; gscroll.module[gscroll.current].offset = offset;
} }
} }
/* Load the user-agent window given the selected IP */ /* Load the user-agent window given the selected IP */
static void static void
load_ip_agent_list (void) { load_ip_agent_list (void) {
int type_ip = 0; int type_ip = 0;
/* make sure we have a valid IP */ /* make sure we have a valid IP */
int sel = gscroll.module[gscroll.current].scroll; int sel = gscroll.module[gscroll.current].scroll;
GDashData item = dash->module[HOSTS].data[sel]; GDashData item = { 0 };
if (dash->module[HOSTS].holder_size == 0)
return;
item = dash->module[HOSTS].data[sel];
if (!invalid_ipaddr (item.metrics->data, &type_ip)) if (!invalid_ipaddr (item.metrics->data, &type_ip))
load_agent_list (main_win, item.metrics->data); load_agent_list (main_win, item.metrics->data);
} }
/* Expand the selected module */ /* Expand the selected module */
static void static void
expand_current_module (void) { expand_current_module (void) {
if (gscroll.expanded && gscroll.current == HOSTS) { if (gscroll.expanded && gscroll.current == HOSTS) {
load_ip_agent_list (); load_ip_agent_list ();
return; return;
skipping to change at line 710 skipping to change at line 715
char *json = NULL; char *json = NULL;
pthread_mutex_lock (&gdns_thread.mutex); pthread_mutex_lock (&gdns_thread.mutex);
free_holder (&holder); free_holder (&holder);
pthread_cond_broadcast (&gdns_thread.not_empty); pthread_cond_broadcast (&gdns_thread.not_empty);
pthread_mutex_unlock (&gdns_thread.mutex); pthread_mutex_unlock (&gdns_thread.mutex);
allocate_holder (); allocate_holder ();
pthread_mutex_lock (&gdns_thread.mutex); pthread_mutex_lock (&gdns_thread.mutex);
json = get_json (holder, 0); json = get_json (holder, 1);
pthread_mutex_unlock (&gdns_thread.mutex); pthread_mutex_unlock (&gdns_thread.mutex);
if (json == NULL) if (json == NULL)
return; return;
pthread_mutex_lock (&gwswriter->mutex); pthread_mutex_lock (&gwswriter->mutex);
broadcast_holder (gwswriter->fd, json, strlen (json)); broadcast_holder (gwswriter->fd, json, strlen (json));
pthread_mutex_unlock (&gwswriter->mutex); pthread_mutex_unlock (&gwswriter->mutex);
free (json); free (json);
} }
/* Fast-forward latest JSON data when client connection is opened. */ /* Fast-forward latest JSON data when client connection is opened. */
static void static void
fast_forward_client (int listener) { fast_forward_client (int listener) {
char *json = NULL; char *json = NULL;
pthread_mutex_lock (&gdns_thread.mutex); pthread_mutex_lock (&gdns_thread.mutex);
json = get_json (holder, 0); json = get_json (holder, 1);
pthread_mutex_unlock (&gdns_thread.mutex); pthread_mutex_unlock (&gdns_thread.mutex);
if (json == NULL) if (json == NULL)
return; return;
pthread_mutex_lock (&gwswriter->mutex); pthread_mutex_lock (&gwswriter->mutex);
send_holder_to_client (gwswriter->fd, listener, json, strlen (json)); send_holder_to_client (gwswriter->fd, listener, json, strlen (json));
pthread_mutex_unlock (&gwswriter->mutex); pthread_mutex_unlock (&gwswriter->mutex);
free (json); free (json);
} }
skipping to change at line 1113 skipping to change at line 1118
/* reset expanded module */ /* reset expanded module */
if (set_module_to (&gscroll, CACHE_STATUS) == 0) if (set_module_to (&gscroll, CACHE_STATUS) == 0)
render_screens (offset); render_screens (offset);
break; break;
#ifdef HAVE_GEOLOCATION #ifdef HAVE_GEOLOCATION
case 94: /* Shift + 6 */ case 94: /* Shift + 6 */
/* reset expanded module */ /* reset expanded module */
if (set_module_to (&gscroll, GEO_LOCATION) == 0) if (set_module_to (&gscroll, GEO_LOCATION) == 0)
render_screens (offset); render_screens (offset);
break; break;
#endif
case 38: /* Shift + 7 */ case 38: /* Shift + 7 */
/* reset expanded module */ /* reset expanded module */
if (set_module_to (&gscroll, ASN) == 0)
render_screens (offset);
break;
#endif
case 42: /* Shift + 7 */
/* reset expanded module */
if (set_module_to (&gscroll, MIME_TYPE) == 0) if (set_module_to (&gscroll, MIME_TYPE) == 0)
render_screens (offset); render_screens (offset);
break; break;
case 42: /* Shift + 8 */ case 40: /* Shift + 8 */
/* reset expanded module */ /* reset expanded module */
if (set_module_to (&gscroll, TLS_TYPE) == 0) if (set_module_to (&gscroll, TLS_TYPE) == 0)
render_screens (offset); render_screens (offset);
break; break;
case 9: /* TAB */ case 9: /* TAB */
/* reset expanded module */ /* reset expanded module */
collapse_current_module (); collapse_current_module ();
if (next_module () == 0) if (next_module () == 0)
render_screens (offset); render_screens (offset);
break; break;
 End of changes. 8 change blocks. 
5 lines changed or deleted 15 lines changed or added

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