summaryrefslogtreecommitdiff
path: root/uclient-http.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-07-28 13:58:02 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-09-04 12:46:11 +0200
commit754ca1bbb0d59a0d2873bb1996307cd92bbf2238 (patch)
treecba95d50ff8a9381eb0e20281243fa9d1e5fa7be /uclient-http.c
parent80e135d9726eb897cd7d9e45a17bbd59e3a8b236 (diff)
downloaduclient-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.c4
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)