diff --git a/src/applet.c b/src/applet.c index e7bf08877..a5b0946b9 100644 --- a/src/applet.c +++ b/src/applet.c @@ -462,7 +462,6 @@ struct task *task_run_applet(struct task *t, void *context, unsigned int state) sc_oc(sc)->flags |= CF_WRITE_EVENT | CF_WROTE_DATA; if (sco->room_needed < 0 || channel_recv_max(sc_oc(sc)) >= sco->room_needed) sc_have_room(sco); - sc_ep_report_send_activity(sc); did_send = 1; } else { @@ -477,8 +476,10 @@ struct task *task_run_applet(struct task *t, void *context, unsigned int state) sc_ep_set(sc, SE_FL_EOS|SE_FL_ERROR); } - if (!co_data(sc_oc(sc))) - sc_ep_report_send_activity(sc); + if (!co_data(sc_oc(sc))) { + if (did_send) + sc_ep_report_send_activity(sc); + } else sc_ep_report_blocked_send(sc, did_send); diff --git a/src/stconn.c b/src/stconn.c index d408e3cd2..896d7e3ec 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -1704,6 +1704,8 @@ static int sc_conn_send(struct stconn *sc) /* FIXME: Must be reviewed for FF */ if (!co_data(oc) && !sc_ep_have_ff_data(sc)) { + if (did_send) + sc_ep_report_send_activity(sc); /* If fast-forwarding is blocked, unblock it now to check for * receive on the other side */ @@ -1712,7 +1714,6 @@ static int sc_conn_send(struct stconn *sc) sc_have_room(sco); did_send = 1; } - sc_ep_report_send_activity(sc); } else { /* We couldn't send all of our data, let the mux know we'd like to send more */