commit | d69c958955ffc6f6e673ba8a2dd2686395d23e6f | [log] [tgz] |
---|---|---|
author | Julius Werner <jwerner@chromium.org> | Thu Dec 27 14:42:56 2012 -0800 |
committer | ChromeBot <chrome-bot@google.com> | Fri Dec 28 10:41:09 2012 -0800 |
tree | fc8736021d6288758a45ca518a959c10267d62ed | |
parent | 1538d44a82072a833aacf05a5047e14a28453906 [diff] |
Do not crash on G_IO_STATUS_EOF in GLibIOInputHandlers CL:37980 changed GLibIOInputHandlers to crash on all non-normal status conditions that could fall out of g_io_channel_read_chars(), instead of silently closing the channel. This was intended to find actual errors, but also affects conditions where the channel has simply reached EOF. This patch reverts part of that behavior, so that EOF conditions once again just throw one last, empty packet into the callback and unregister the input channel. Callbacks are expected to check for that condition and properly destroy the IOHandler, or they will end up leaking memory. BUG=chromium-os:37486 TEST=Make sure shill still works as expected. Connect both to an unprotected and a captive portal network, and check if shill can get online without crashing in both cases. Change-Id: I0abe36a1af324896c102f8e29ff3f1caf3540778 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/40250 Reviewed-by: mukesh agrawal <quiche@chromium.org> Reviewed-by: Paul Stewart <pstew@chromium.org>