Mon, 12 Sep 2016 08:55:35 -0500
gg: Protect against issues when closing while connecting
Since the GIOStream is cancelled when data is freed, any cancelled
callbacks are called after such data is freed. This patch guards against
cancelled calls by safely returning without accessing any freed data if
the connection has been cancelled (aka closed).
Futhermore, if GG tries to connect and is quickly disconnected,
ggp_tcpsocket_close() is never called. As far as I can tell, it's an
existing bug, but PurpleSockets both work differently when closing and
are closed by the connection if any leak. So the issue wasn't a major
problem. This patch lessens the issue by guarding against it, but it
should be fixed at some point.
|
37593
17c34d87c5b3
Initial conversion to gtester
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | #! /bin/sh |
|
17c34d87c5b3
Initial conversion to gtester
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | |
|
17c34d87c5b3
Initial conversion to gtester
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | # run a GTest in tap mode. The test binary is passed as $1 |
|
17c34d87c5b3
Initial conversion to gtester
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | |
|
17c34d87c5b3
Initial conversion to gtester
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | $1 -k --tap |