1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

Fixed $texeci regression.

This commit is contained in:
Brenden Matthews 2009-05-01 23:05:06 -06:00
parent 45b3a6f66d
commit 27fff0d9cb
2 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,6 @@
2009-05-01
* Added diskio_avg_samples patch (thanks Yeon-Hyeong)
* Fixed $texeci regression
2009-04-30
* Added $combine, a var that places 2 other vars next to each other, even if they

View File

@ -587,21 +587,24 @@ void *threaded_exec(void *) __attribute__((noreturn));
void *threaded_exec(void *arg)
{
char *p2;
char *buff, *p2;
struct text_object *obj = (struct text_object *)arg;
while (1) {
p2 = obj->data.texeci.buffer;
timed_thread_lock(obj->data.texeci.p_timed_thread);
read_exec(obj->data.texeci.cmd, obj->data.texeci.buffer,
buff = malloc(text_buffer_size);
read_exec(obj->data.texeci.cmd, buff,
text_buffer_size);
p2 = buff;
while (*p2) {
if (*p2 == '\001') {
*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);
free(buff);
if (timed_thread_test(obj->data.texeci.p_timed_thread, 0)) {
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)) {
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 */
OBJ(imap_unseen) {