mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-27 12:42:41 +00:00
Bugfix: $addr and $addrs couldn't find ip's before the first update.
When you started "$updates|${addr eth0}" displayed "0|No Address", after the first update you got something normal like "1|192.168.0.1" This patch should fix this.
This commit is contained in:
parent
22733a0b4a
commit
8ffb8b238d
@ -405,7 +405,6 @@ static int pad_percents = 0;
|
|||||||
static char *global_text = 0;
|
static char *global_text = 0;
|
||||||
long global_text_lines;
|
long global_text_lines;
|
||||||
|
|
||||||
static int total_updates;
|
|
||||||
static int updatereset;
|
static int updatereset;
|
||||||
|
|
||||||
int check_contains(char *f, char *s)
|
int check_contains(char *f, char *s)
|
||||||
|
@ -332,6 +332,8 @@ enum x_initialiser_state {
|
|||||||
extern int output_methods;
|
extern int output_methods;
|
||||||
extern enum x_initialiser_state x_initialised;
|
extern enum x_initialiser_state x_initialised;
|
||||||
|
|
||||||
|
int total_updates;
|
||||||
|
|
||||||
#define DEFAULT_TEXT_BUFFER_SIZE_S "##DEFAULT_TEXT_BUFFER_SIZE"
|
#define DEFAULT_TEXT_BUFFER_SIZE_S "##DEFAULT_TEXT_BUFFER_SIZE"
|
||||||
|
|
||||||
#endif /* _conky_h_ */
|
#endif /* _conky_h_ */
|
||||||
|
@ -187,7 +187,7 @@ void update_net_stats()
|
|||||||
|
|
||||||
/* get delta */
|
/* get delta */
|
||||||
delta = current_update_time - last_update_time;
|
delta = current_update_time - last_update_time;
|
||||||
if (delta <= 0.0001) {
|
if (delta <= 0.0001 && total_updates != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ void update_net_stats(void)
|
|||||||
|
|
||||||
/* get delta */
|
/* get delta */
|
||||||
delta = current_update_time - last_update_time;
|
delta = current_update_time - last_update_time;
|
||||||
if (delta <= 0.0001) {
|
if (delta <= 0.0001 && total_updates != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ void update_net_stats()
|
|||||||
|
|
||||||
/* get delta */
|
/* get delta */
|
||||||
delta = current_update_time - last_update_time;
|
delta = current_update_time - last_update_time;
|
||||||
if (delta <= 0.0001) {
|
if (delta <= 0.0001 && total_updates != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ void update_net_stats()
|
|||||||
|
|
||||||
/* get delta */
|
/* get delta */
|
||||||
delta = current_update_time - last_update_time;
|
delta = current_update_time - last_update_time;
|
||||||
if (delta <= 0.0001) {
|
if (delta <= 0.0001 && total_updates != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user