mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 04:17:33 +00:00
Fixed $texeci regression.
This commit is contained in:
parent
45b3a6f66d
commit
27fff0d9cb
@ -1,5 +1,6 @@
|
|||||||
2009-05-01
|
2009-05-01
|
||||||
* Added diskio_avg_samples patch (thanks Yeon-Hyeong)
|
* Added diskio_avg_samples patch (thanks Yeon-Hyeong)
|
||||||
|
* Fixed $texeci regression
|
||||||
|
|
||||||
2009-04-30
|
2009-04-30
|
||||||
* Added $combine, a var that places 2 other vars next to each other, even if they
|
* Added $combine, a var that places 2 other vars next to each other, even if they
|
||||||
|
18
src/conky.c
18
src/conky.c
@ -587,21 +587,24 @@ void *threaded_exec(void *) __attribute__((noreturn));
|
|||||||
|
|
||||||
void *threaded_exec(void *arg)
|
void *threaded_exec(void *arg)
|
||||||
{
|
{
|
||||||
char *p2;
|
char *buff, *p2;
|
||||||
struct text_object *obj = (struct text_object *)arg;
|
struct text_object *obj = (struct text_object *)arg;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
p2 = obj->data.texeci.buffer;
|
buff = malloc(text_buffer_size);
|
||||||
timed_thread_lock(obj->data.texeci.p_timed_thread);
|
read_exec(obj->data.texeci.cmd, buff,
|
||||||
read_exec(obj->data.texeci.cmd, obj->data.texeci.buffer,
|
|
||||||
text_buffer_size);
|
text_buffer_size);
|
||||||
|
p2 = buff;
|
||||||
while (*p2) {
|
while (*p2) {
|
||||||
if (*p2 == '\001') {
|
if (*p2 == '\001') {
|
||||||
*p2 = ' ';
|
*p2 = ' ';
|
||||||
}
|
}
|
||||||
p2++;
|
p2++;
|
||||||
}
|
}
|
||||||
|
timed_thread_lock(obj->data.texeci.p_timed_thread);
|
||||||
|
strncpy(obj->data.texeci.buffer, buff, text_buffer_size);
|
||||||
timed_thread_unlock(obj->data.texeci.p_timed_thread);
|
timed_thread_unlock(obj->data.texeci.p_timed_thread);
|
||||||
|
free(buff);
|
||||||
if (timed_thread_test(obj->data.texeci.p_timed_thread, 0)) {
|
if (timed_thread_test(obj->data.texeci.p_timed_thread, 0)) {
|
||||||
timed_thread_exit(obj->data.texeci.p_timed_thread);
|
timed_thread_exit(obj->data.texeci.p_timed_thread);
|
||||||
}
|
}
|
||||||
@ -3746,10 +3749,11 @@ static void generate_text_internal(char *p, int p_max_size,
|
|||||||
if (timed_thread_run(obj->data.texeci.p_timed_thread)) {
|
if (timed_thread_run(obj->data.texeci.p_timed_thread)) {
|
||||||
ERR("Error running texeci timed thread");
|
ERR("Error running texeci timed thread");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
timed_thread_lock(obj->data.texeci.p_timed_thread);
|
||||||
|
snprintf(p, text_buffer_size, "%s", obj->data.texeci.buffer);
|
||||||
|
timed_thread_unlock(obj->data.texeci.p_timed_thread);
|
||||||
}
|
}
|
||||||
timed_thread_lock(obj->data.texeci.p_timed_thread);
|
|
||||||
snprintf(p, text_buffer_size, "%s", obj->data.texeci.buffer);
|
|
||||||
timed_thread_unlock(obj->data.texeci.p_timed_thread);
|
|
||||||
}
|
}
|
||||||
#endif /* HAVE_POPEN */
|
#endif /* HAVE_POPEN */
|
||||||
OBJ(imap_unseen) {
|
OBJ(imap_unseen) {
|
||||||
|
Loading…
Reference in New Issue
Block a user