From: Jo-Philipp Wich Date: Mon, 28 Jul 2014 11:58:02 +0000 (+0200) Subject: uclient-http: only invoke data_sent callback if it is provided X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=754ca1bbb0d59a0d2873bb1996307cd92bbf2238;p=oweals%2Fuclient.git uclient-http: only invoke data_sent callback if it is provided Signed-off-by: Jo-Philipp Wich --- diff --git a/uclient-http.c b/uclient-http.c index 4633956..1569cda 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -657,7 +657,9 @@ static void __uclient_notify_read(struct uclient_http *uh) static void __uclient_notify_write(struct uclient_http *uh) { struct uclient *uc = &uh->uc; - uc->cb->data_sent(uc); + + if (uc->cb->data_sent) + uc->cb->data_sent(uc); } static void uclient_notify_read(struct ustream *us, int bytes)