diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-07-28 13:58:02 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-09-04 12:46:11 +0200 |
commit | 754ca1bbb0d59a0d2873bb1996307cd92bbf2238 (patch) | |
tree | cba95d50ff8a9381eb0e20281243fa9d1e5fa7be /uclient-http.c | |
parent | 80e135d9726eb897cd7d9e45a17bbd59e3a8b236 (diff) | |
download | uclient-754ca1bbb0d59a0d2873bb1996307cd92bbf2238.tar.gz |
uclient-http: only invoke data_sent callback if it is provided
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'uclient-http.c')
-rw-r--r-- | uclient-http.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) |