David Woodhouse [Fri, 22 Nov 2019 21:20:48 +0000 (21:20 +0000)]
Handle unexpected closure of screen websocket
I don't think this was a cause of dropouts because the reported behaviour
was a stall (no movement in the picture). And when the websocket drops,
the shared screen drops and other participants see that it's gone.
But we should handle it appropriately anyway. By visibly dropping and
reporting an error for now. If necessary we'll make it automatically
reconnect like the audio stream does.
David Woodhouse [Fri, 22 Nov 2019 21:02:55 +0000 (21:02 +0000)]
Fix outbound screenshare dropouts
I think I've found the reason, along with the reason I could never
reproduce it on demand. The videorate element insists on producing
precisely one output frame for every third of the second... since the
epoch (when GStreamer started up). Not from the start of the call.
So if you've only been running Pidgin for a few seconds and you make
a test call, and it's the first GStreamer pipeline, it all works fine.
Hang up, wait an hour and then share another screen, and it'll send
10800 duplicate copies of the first frame before it ever sends anything
else.
David Woodhouse [Fri, 22 Nov 2019 12:24:44 +0000 (12:24 +0000)]
Fix compiler warning in chime_connection_send_message_async()
(1) Event suspicious_sizeof: Passing argument "&message" of type
"gchar const **" and argument "8L /* sizeof (gchar const **) */"
to function "g_checksum_update" is suspicious. In this case,
"sizeof (gchar const **)" is equal to "sizeof (gchar const *)",
but this is not a portable assumption.
(2) Event remediation: Did you intend to use "sizeof (gchar const *)"
instead of "sizeof (gchar const **)"?
David Woodhouse [Tue, 19 Nov 2019 15:01:35 +0000 (15:01 +0000)]
Reduce outbound screenshare bandwidth
I've been sharing my screen for an hour now, without any dropouts. Not
really sure if this is it; it's never really been reproducible on
demand when I've been trying to debug it anyway...
David Woodhouse [Tue, 19 Nov 2019 10:38:44 +0000 (10:38 +0000)]
Fix use-after-free crash in message gathering
When cleanup_msgs() is called, there may be a pending fetch. We were
seeing crashes when fetch_msgs_cb() ended up using the freed msgs
structure. Let cleanup_msgs() do the freeing instead of the caller
(since we already have this nasty hack that the msgs struct needs
to be at the start of the chat/im structure. And then defer the
final free() until fetch_msgs_cb() is called, if necessary.
David Woodhouse [Mon, 18 Nov 2019 11:43:14 +0000 (11:43 +0000)]
Sort room list and implement 'Leave Room'
We can't leave rooms from the room list display because Pidgin doesn't
let us add action buttons there, but we could do our own version as a
search results box, triggered from the account menu.
David Woodhouse [Tue, 21 May 2019 17:03:22 +0000 (10:03 -0700)]
Drop libecal-1.2 BR for specfile
It's not clear why we have to change the actual pkgconfig module name
instead of just the version. But any attempt to BR one or the other
would be fairly distro-specific anyway, based on %_fedora. So we might
as well just *not* BR it, and depend on the equally distro-specific
knowledge that it's in the evolution-data-server-devel package along
with all the other things that we *do* BR.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
David Woodhouse [Mon, 24 Sep 2018 08:51:09 +0000 (09:51 +0100)]
Fix C89 build failure on Fedora 28
BUILDSTDERR: prpl/attachments.c: In function 'get_mime_type':
BUILDSTDERR: prpl/attachments.c:523:3: error: 'for' loop initial declarations are only allowed in C99 mode
BUILDSTDERR: for (int i = 0; i < sizeof(file_types) / sizeof(struct FileType); i++) {
BUILDSTDERR: ^
BUILDSTDERR: prpl/attachments.c:523:3: note: use option -std=c99 or -std=gnu99 to compile your code
Isaac Jurado [Wed, 12 Sep 2018 20:05:01 +0000 (22:05 +0200)]
Update WarpDrive authentication.
Bring the WD authentication scrapping up to date with the current web version.
The JS file used to extract the GWT policy ID no longer exists. Also, use newer
versions of the GWT request structures.
David Woodhouse [Sat, 5 May 2018 11:39:32 +0000 (12:39 +0100)]
Support screen share when built against older libpurple
We can use dlsym() to get at purple_request_screenshare_media(), and now
we can have full functionality even when built against Pidgin 2.13.0 and
only *running* with 2.14.0.
This means the real Fedora build (once it's reviewed) won't be less
functional than the COPR build from the same source.
David Woodhouse [Sat, 5 May 2018 11:14:12 +0000 (12:14 +0100)]
Support .get_cb_alias even when built against older libpurple
It's harmless to extend the PRPL struct and provide the feature bits as
they'll be ignored. So just do it and don't make the newer libpurple a
build dependency.
David Woodhouse [Fri, 4 May 2018 11:30:22 +0000 (12:30 +0100)]
Trust Amazon certificates
Some of the media endpoints have certificates issued by the Amazon internal
CA. Trust them. Might as well have the Amazon public trust roots too, just
for good measure.
Isaac Jurado [Tue, 1 May 2018 14:50:37 +0000 (16:50 +0200)]
Do not automatically connect upon object construction.
chime_connection_new() automatically calls chime_connection_connect(), but if
the session token is not given, there hasn't been any chance to connect the
"authenticate" signal in order to properly transfer control through the code.
Instead of implicitly connecting upon object creation, let the caller do it
explicitly. The purple plugin is also changed to conform to that.
Isaac Jurado [Tue, 1 May 2018 11:02:17 +0000 (13:02 +0200)]
Refactor the login/sign-in code.
To conform with the backend/frontend split of this package, the sign in code has
been refactored by separtaing the screen scrapping parts from the front
end (user interaction) parts.
The split between sign in provider types is no more, so all the login dirty code
lives together in chime/chime-signin.c.
Also, a new utility (chime-get-token) has been incorporated to ease the debug of
the sign in process, and also as an easy way to obtain a session token for Chime
bot developers.
David Woodhouse [Tue, 1 May 2018 08:50:50 +0000 (09:50 +0100)]
Validate DTLS server certificate
Hm, it really shouldn't be so easy to forget this. There really is a case
to be made that you should get GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR by
default *unless* you set up verification. Fail safe, not open.