Mercurial > pidgin
changeset 17261:d5f07d1e37e6
merge of '6525314558c2dea73ad89f89cd7772b645cc8b40'
and '73fe0aadf00e90ae634f0fbe253a634ce3f60b74'
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Fri, 25 May 2007 18:38:22 +0000 |
parents | c76bee45540a (diff) 5b38f5ecc49e (current diff) |
children | 3939bfca572e |
files | |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/plugins/ssl/ssl-gnutls.c Fri May 25 17:53:58 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-gnutls.c Fri May 25 18:38:22 2007 +0000 @@ -123,6 +123,18 @@ gnutls_data->handshake_handler = purple_input_add(gsc->fd, PURPLE_INPUT_READ, ssl_gnutls_handshake_cb, gsc); + /* Orborde asks: Why are we configuring a callback, then + immediately calling it? + + Answer: gnutls_handshake (up in handshake_cb) needs to be called + once in order to get the ball rolling on the SSL connection. + Once it has done so, only then will the server reply, triggering + the callback. + + Since the logic driving gnutls_handshake is the same with the first + and subsequent calls, we'll just fire the callback immediately to + accomplish this. + */ ssl_gnutls_handshake_cb(gsc, gsc->fd, PURPLE_INPUT_READ); }
--- a/libpurple/sslconn.h Fri May 25 17:53:58 2007 +0000 +++ b/libpurple/sslconn.h Fri May 25 18:38:22 2007 +0000 @@ -170,6 +170,7 @@ /** * Adds an input watcher for the specified SSL connection. + * Once the SSL handshake is complete, use this to watch for actual data across it. * * @param gsc The SSL connection handle. * @param func The callback function.