Commit c4f9bd72 authored by cypherpunk's avatar cypherpunk
Browse files

	* dialogs.h:
	* dialogs.c:
	* gtk-dialog.c:
	* otr-plugin.c: Track libotr API change: protocol_version is now
	part of the ConnContext, and not passed separately to the
	gone_secure() and still_secure() plugins.
parent 1e79c738
2005-10-19
* dialogs.h:
* dialogs.c:
* gtk-dialog.c:
* otr-plugin.c: Track libotr API change: protocol_version is now
part of the ConnContext, and not passed separately to the
gone_secure() and still_secure() plugins.
* otr-plugin.c: Removed automatic sending of
OTRL_TLV_DISCONNECTED at quitting time, since it causes
unreadable messages to be sent to people with clients who don't
......
......@@ -126,9 +126,9 @@ void otrg_dialog_verify_fingerprint(Fingerprint *fprint)
}
/* Call this when a context transitions to ENCRYPTED. */
void otrg_dialog_connected(ConnContext *context, int protocol_version)
void otrg_dialog_connected(ConnContext *context)
{
ui_ops->connected(context, protocol_version);
ui_ops->connected(context);
}
/* Call this when a context transitions to PLAINTEXT. */
......@@ -139,9 +139,9 @@ void otrg_dialog_disconnected(ConnContext *context)
/* Call this when we receive a Key Exchange message that doesn't cause
* our state to change (because it was just the keys we knew already). */
void otrg_dialog_stillconnected(ConnContext *context, int protocol_version)
void otrg_dialog_stillconnected(ConnContext *context)
{
ui_ops->stillconnected(context, protocol_version);
ui_ops->stillconnected(context);
}
/* Call this if the remote user terminates his end of an ENCRYPTED
......
......@@ -54,11 +54,11 @@ typedef struct {
void (*verify_fingerprint)(Fingerprint *fprint);
void (*connected)(ConnContext *context, int protocol_version);
void (*connected)(ConnContext *context);
void (*disconnected)(ConnContext *context);
void (*stillconnected)(ConnContext *context, int protocol_version);
void (*stillconnected)(ConnContext *context);
void (*finished)(const char *accountname, const char *protocol,
const char *username);
......@@ -122,14 +122,14 @@ void otrg_dialog_unknown_fingerprint(OtrlUserState us, const char *accountname,
void otrg_dialog_verify_fingerprint(Fingerprint *fprint);
/* Call this when a context transitions to ENCRYPTED. */
void otrg_dialog_connected(ConnContext *context, int protocol_version);
void otrg_dialog_connected(ConnContext *context);
/* Call this when a context transitions to PLAINTEXT. */
void otrg_dialog_disconnected(ConnContext *context);
/* Call this when we receive a Key Exchange message that doesn't cause
* our state to change (because it was just the keys we knew already). */
void otrg_dialog_stillconnected(ConnContext *context, int protocol_version);
void otrg_dialog_stillconnected(ConnContext *context);
/* Call this if the remote user terminates his end of an ENCRYPTED
* connection, and lets us know. */
......
......@@ -773,8 +773,7 @@ static void otrg_gtk_dialog_verify_fingerprint(Fingerprint *fprint)
}
/* Call this when a context transitions to ENCRYPTED. */
static void otrg_gtk_dialog_connected(ConnContext *context,
int protocol_version)
static void otrg_gtk_dialog_connected(ConnContext *context)
{
GaimConversation *conv;
char *buf;
......@@ -791,8 +790,8 @@ static void otrg_gtk_dialog_connected(ConnContext *context,
* we're in ENCRYPTED. */
"Not private",
gaim_conversation_get_name(conv),
protocol_version == 1 ? " Warning: using old protocol "
"version 1." : "");
context->protocol_version == 1 ? " Warning: using old "
"protocol version 1." : "");
gaim_conversation_write(conv, NULL, buf, GAIM_MESSAGE_SYSTEM, time(NULL));
g_free(buf);
......@@ -842,8 +841,7 @@ static void otrg_gtk_dialog_finished(const char *accountname,
/* Call this when we receive a Key Exchange message that doesn't cause
* our state to change (because it was just the keys we knew already). */
static void otrg_gtk_dialog_stillconnected(ConnContext *context,
int protocol_version)
static void otrg_gtk_dialog_stillconnected(ConnContext *context)
{
GaimConversation *conv;
char *buf;
......@@ -861,8 +859,8 @@ static void otrg_gtk_dialog_stillconnected(ConnContext *context,
* we're in ENCRYPTED. */
"not private",
gaim_conversation_get_name(conv),
protocol_version == 1 ? " Warning: using old protocol "
"version 1." : "");
context->protocol_version == 1 ? " Warning: using old "
"protocol version 1." : "");
gaim_conversation_write(conv, NULL, buf, GAIM_MESSAGE_SYSTEM, time(NULL));
g_free(buf);
......
......@@ -222,10 +222,9 @@ static void write_fingerprints_cb(void *opdata)
otrg_plugin_write_fingerprints();
}
static void gone_secure_cb(void *opdata, ConnContext *context,
int protocol_version)
static void gone_secure_cb(void *opdata, ConnContext *context)
{
otrg_dialog_connected(context, protocol_version);
otrg_dialog_connected(context);
}
static void gone_insecure_cb(void *opdata, ConnContext *context)
......@@ -233,11 +232,10 @@ static void gone_insecure_cb(void *opdata, ConnContext *context)
otrg_dialog_disconnected(context);
}
static void still_secure_cb(void *opdata, ConnContext *context, int is_reply,
int protocol_version)
static void still_secure_cb(void *opdata, ConnContext *context, int is_reply)
{
if (is_reply == 0) {
otrg_dialog_stillconnected(context, protocol_version);
otrg_dialog_stillconnected(context);
}
}
......@@ -520,7 +518,6 @@ static gboolean otr_plugin_load(GaimPlugin *handle)
void *conv_handle = gaim_conversations_get_handle();
void *conn_handle = gaim_connections_get_handle();
void *blist_handle = gaim_blist_get_handle();
void *core_handle = gaim_get_core();
if (!privkeyfile || !storefile) {
g_free(privkeyfile);
......@@ -567,7 +564,6 @@ static gboolean otr_plugin_unload(GaimPlugin *handle)
void *conv_handle = gaim_conversations_get_handle();
void *conn_handle = gaim_connections_get_handle();
void *blist_handle = gaim_blist_get_handle();
void *core_handle = gaim_get_core();
/* Clean up all of our state. */
otrl_userstate_free(otrg_plugin_userstate);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment