diff options
author | nicm <nicm> | 2018-08-23 15:45:05 +0000 |
---|---|---|
committer | nicm <nicm> | 2018-08-23 15:45:05 +0000 |
commit | bceccc6b63b48ddeefb035ef6d910bea60340342 (patch) | |
tree | c431664eda689fe64d533f846cf180427f0b0eba /format.c | |
parent | 55db3623bf7084a161d457f0c0b891a46a444a77 (diff) | |
download | rtmux-bceccc6b63b48ddeefb035ef6d910bea60340342.tar.gz rtmux-bceccc6b63b48ddeefb035ef6d910bea60340342.tar.bz2 rtmux-bceccc6b63b48ddeefb035ef6d910bea60340342.zip |
Move job struct into job.c.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -191,8 +191,8 @@ static const char *format_lower[] = { static void format_job_update(struct job *job) { - struct format_job *fj = job->data; - struct evbuffer *evb = job->event->input; + struct format_job *fj = job_get_data(job); + struct evbuffer *evb = job_get_event(job)->input; char *line = NULL, *next; time_t t; @@ -221,18 +221,19 @@ format_job_update(struct job *job) static void format_job_complete(struct job *job) { - struct format_job *fj = job->data; + struct format_job *fj = job_get_data(job); + struct evbuffer *evb = job_get_event(job)->input; char *line, *buf; size_t len; fj->job = NULL; buf = NULL; - if ((line = evbuffer_readline(job->event->input)) == NULL) { - len = EVBUFFER_LENGTH(job->event->input); + if ((line = evbuffer_readline(evb)) == NULL) { + len = EVBUFFER_LENGTH(evb); buf = xmalloc(len + 1); if (len != 0) - memcpy(buf, EVBUFFER_DATA(job->event->input), len); + memcpy(buf, EVBUFFER_DATA(evb), len); buf[len] = '\0'; } else buf = line; |