2 # Parent 1b31bdb72d83850b146a0e1e135eba35bad73d29 |
2 # Parent 1b31bdb72d83850b146a0e1e135eba35bad73d29 |
3 Switch to libotr v4 API |
3 Switch to libotr v4 API |
4 |
4 |
5 diff -r 1b31bdb72d83 mcabber/configure.ac |
5 diff -r 1b31bdb72d83 mcabber/configure.ac |
6 --- a/mcabber/configure.ac Sun Jan 13 04:35:32 2013 +0200 |
6 --- a/mcabber/configure.ac Sun Jan 13 04:35:32 2013 +0200 |
7 +++ b/mcabber/configure.ac Sun Jan 13 06:15:55 2013 +0200 |
7 +++ b/mcabber/configure.ac Fri Jan 18 11:23:47 2013 +0200 |
8 @@ -183,16 +183,26 @@ |
8 @@ -183,16 +183,26 @@ |
9 |
9 |
10 # Check for otr |
10 # Check for otr |
11 AC_ARG_ENABLE(otr, |
11 AC_ARG_ENABLE(otr, |
12 - AC_HELP_STRING([--enable-otr], |
12 - AC_HELP_STRING([--enable-otr], |
46 Makefile]) |
46 Makefile]) |
47 AC_OUTPUT |
47 AC_OUTPUT |
48 +dnl vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... |
48 +dnl vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... |
49 diff -r 1b31bdb72d83 mcabber/mcabber/otr.c |
49 diff -r 1b31bdb72d83 mcabber/mcabber/otr.c |
50 --- a/mcabber/mcabber/otr.c Sun Jan 13 04:35:32 2013 +0200 |
50 --- a/mcabber/mcabber/otr.c Sun Jan 13 04:35:32 2013 +0200 |
51 +++ b/mcabber/mcabber/otr.c Sun Jan 13 06:15:55 2013 +0200 |
51 +++ b/mcabber/mcabber/otr.c Fri Jan 18 11:23:47 2013 +0200 |
52 @@ -56,6 +56,20 @@ |
52 @@ -56,6 +56,20 @@ |
53 const char *protocol, |
53 const char *protocol, |
54 const char *recipient, |
54 const char *recipient, |
55 const char *message); |
55 const char *message); |
56 +static void cb_update_context_list(void *opdata); |
56 +static void cb_update_context_list(void *opdata); |
155 static void otr_startstop(const char *buddy, int start); |
155 static void otr_startstop(const char *buddy, int start); |
156 -static void otr_handle_smp_tlvs(OtrlTLV *tlvs, ConnContext *ctx); |
156 -static void otr_handle_smp_tlvs(OtrlTLV *tlvs, ConnContext *ctx); |
157 |
157 |
158 static char *otr_get_dir(void); |
158 static char *otr_get_dir(void); |
159 |
159 |
160 @@ -145,6 +181,13 @@ |
160 @@ -135,7 +171,6 @@ |
|
161 account = jidtodisp(fjid); |
|
162 keyfile = g_strdup_printf("%s%s.key", root, account); |
|
163 fprfile = g_strdup_printf("%s%s.fpr", root, account); |
|
164 - g_free(root); |
|
165 |
|
166 if (otrl_privkey_read(userstate, keyfile)){ |
|
167 scr_LogPrint(LPRINT_LOGNORM, "Could not read OTR key from %s", keyfile); |
|
168 @@ -145,6 +180,14 @@ |
161 scr_LogPrint(LPRINT_LOGNORM, "Could not read OTR fingerprints from %s", |
169 scr_LogPrint(LPRINT_LOGNORM, "Could not read OTR fingerprints from %s", |
162 fprfile); |
170 fprfile); |
163 } |
171 } |
164 +#ifndef HAVE_LIBOTR3 |
172 +#ifndef HAVE_LIBOTR3 |
165 + tagfile = g_strdup_printf("%s%s.tag", root, account); |
173 + tagfile = g_strdup_printf("%s%s.tag", root, account); |
166 + if (otrl_instag_read(userstate, tagfile)) { |
174 + if (otrl_instag_read(userstate, tagfile)) { |
167 + scr_LogPrint(LPRINT_LOGNORM, "Could not read OTR instance tag from %s", tagfile); |
175 + scr_LogPrint(LPRINT_LOGNORM, "Could not read OTR instance tag from %s", tagfile); |
168 + cb_create_instag(NULL, account, OTR_PROTOCOL_NAME); |
176 + cb_create_instag(NULL, account, OTR_PROTOCOL_NAME); |
169 + } |
177 + } |
170 +#endif |
178 +#endif |
|
179 + g_free(root); |
171 } |
180 } |
172 |
181 |
173 void otr_terminate(void) |
182 void otr_terminate(void) |
174 @@ -154,6 +197,13 @@ |
183 @@ -154,6 +197,13 @@ |
175 if (!otr_is_enabled) |
184 if (!otr_is_enabled) |
580 /* Find the maximum message size supported by this protocol. */ |
589 /* Find the maximum message size supported by this protocol. */ |
581 static int cb_max_message_size(void *opdata, ConnContext *context) |
590 static int cb_max_message_size(void *opdata, ConnContext *context) |
582 { |
591 { |
583 diff -r 1b31bdb72d83 mcabber/mcabber/otr.h |
592 diff -r 1b31bdb72d83 mcabber/mcabber/otr.h |
584 --- a/mcabber/mcabber/otr.h Sun Jan 13 04:35:32 2013 +0200 |
593 --- a/mcabber/mcabber/otr.h Sun Jan 13 04:35:32 2013 +0200 |
585 +++ b/mcabber/mcabber/otr.h Sun Jan 13 06:15:55 2013 +0200 |
594 +++ b/mcabber/mcabber/otr.h Fri Jan 18 11:23:47 2013 +0200 |
586 @@ -5,6 +5,9 @@ |
595 @@ -5,6 +5,9 @@ |
587 |
596 |
588 #ifdef HAVE_LIBOTR |
597 #ifdef HAVE_LIBOTR |
589 |
598 |
590 +#ifndef HAVE_LIBOTR3 |
599 +#ifndef HAVE_LIBOTR3 |