mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Removed debug
This commit is contained in:
parent
1155ceabbc
commit
8994b3769c
@ -24,7 +24,7 @@ debian_prepare()
|
|||||||
echo
|
echo
|
||||||
echo Profanity installer... installing dependencies
|
echo Profanity installer... installing dependencies
|
||||||
echo
|
echo
|
||||||
sudo apt-get -y install git automake autoconf libssl-dev libexpat1-dev libncursesw5-dev libglib2.0-dev libnotify-dev libcurl3-dev libxss-dev libotr2-dev
|
sudo apt-get -y install git automake autoconf libssl-dev libexpat1-dev libncursesw5-dev libglib2.0-dev libnotify-dev libcurl3-dev libxss-dev libotr5-dev
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,7 +73,9 @@ install_lib_strophe()
|
|||||||
echo
|
echo
|
||||||
echo Profanity installer... installing libstrophe
|
echo Profanity installer... installing libstrophe
|
||||||
echo
|
echo
|
||||||
git clone git://github.com/strophe/libstrophe.git
|
#clone fork so as to not pick up any breaking changes
|
||||||
|
#git clone git://github.com/strophe/libstrophe.git
|
||||||
|
git clone git://github.com/boothj5/libstrophe.git
|
||||||
cd libstrophe
|
cd libstrophe
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./configure
|
./configure
|
||||||
|
@ -154,9 +154,7 @@ _otr_init(void)
|
|||||||
ops.gone_secure = cb_gone_secure;
|
ops.gone_secure = cb_gone_secure;
|
||||||
|
|
||||||
otrlib_init_ops(&ops);
|
otrlib_init_ops(&ops);
|
||||||
|
|
||||||
otrlib_init_timer();
|
otrlib_init_timer();
|
||||||
|
|
||||||
smp_initiators = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
|
smp_initiators = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
|
||||||
|
|
||||||
data_loaded = FALSE;
|
data_loaded = FALSE;
|
||||||
@ -491,7 +489,7 @@ _otr_encrypt_message(const char * const to, const char * const message)
|
|||||||
char *newmessage = NULL;
|
char *newmessage = NULL;
|
||||||
gcry_error_t err = otrlib_encrypt_message(user_state, &ops, jid, to, message, &newmessage);
|
gcry_error_t err = otrlib_encrypt_message(user_state, &ops, jid, to, message, &newmessage);
|
||||||
|
|
||||||
if (!err == GPG_ERR_NO_ERROR) {
|
if (err != 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
return newmessage;
|
return newmessage;
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <libotr/message.h>
|
#include <libotr/message.h>
|
||||||
|
|
||||||
#include "ui/ui.h"
|
#include "ui/ui.h"
|
||||||
|
#include "log.h"
|
||||||
#include "otr/otr.h"
|
#include "otr/otr.h"
|
||||||
#include "otr/otrlib.h"
|
#include "otr/otrlib.h"
|
||||||
|
|
||||||
@ -100,59 +101,12 @@ cb_handle_msg_event(void *opdata, OtrlMessageEvent msg_event,
|
|||||||
ConnContext *context, const char *message,
|
ConnContext *context, const char *message,
|
||||||
gcry_error_t err)
|
gcry_error_t err)
|
||||||
{
|
{
|
||||||
switch(msg_event)
|
if (err != 0) {
|
||||||
{
|
if (message != NULL) {
|
||||||
case OTRL_MSGEVENT_ENCRYPTION_REQUIRED:
|
cons_show_error("%s", message);
|
||||||
cons_show_error("Our policy requires encryption but we are trying to send an unencrypted message out.");
|
} else {
|
||||||
break;
|
cons_show_error("OTR error event with no message.");
|
||||||
case OTRL_MSGEVENT_ENCRYPTION_ERROR:
|
}
|
||||||
cons_show_error("An error occured while encrypting a message and the message was not sent.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_CONNECTION_ENDED:
|
|
||||||
cons_show_error("Message has not been sent because our buddy has ended the private conversation. We should either close the connection, or refresh it.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_SETUP_ERROR:
|
|
||||||
cons_show_error("A private conversation could not be set up. A gcry_error_t will be passed.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_MSG_REFLECTED:
|
|
||||||
cons_show_error("Received our own OTR messages.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_MSG_RESENT:
|
|
||||||
cons_show_error("The previous message was resent.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_RCVDMSG_NOT_IN_PRIVATE:
|
|
||||||
cons_show_error("Received an encrypted message but cannot read it because no private connection is established yet.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_RCVDMSG_UNREADABLE:
|
|
||||||
cons_show_error("Cannot read the received message.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_RCVDMSG_MALFORMED:
|
|
||||||
cons_show_error("The message received contains malformed data.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_LOG_HEARTBEAT_RCVD:
|
|
||||||
cons_show_error("Received a heartbeat.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_LOG_HEARTBEAT_SENT:
|
|
||||||
cons_show_error("Sent a heartbeat.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_RCVDMSG_GENERAL_ERR:
|
|
||||||
cons_show_error("Received a general OTR error. The argument 'message' will also be passed and it will contain the OTR error message.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_RCVDMSG_UNENCRYPTED:
|
|
||||||
cons_show_error("Received an unencrypted message. The argument 'smessage' will also be passed and it will contain the plaintext message.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_RCVDMSG_UNRECOGNIZED:
|
|
||||||
cons_show_error("Cannot recognize the type of OTR message received.");
|
|
||||||
break;
|
|
||||||
case OTRL_MSGEVENT_RCVDMSG_FOR_OTHER_INSTANCE:
|
|
||||||
cons_show_error("Received and discarded a message intended for another instance.");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (message != NULL) {
|
|
||||||
cons_show_error("Message: %s", message);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +116,6 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
|
|||||||
char *question)
|
char *question)
|
||||||
{
|
{
|
||||||
NextExpectedSMP nextMsg = context->smstate->nextExpected;
|
NextExpectedSMP nextMsg = context->smstate->nextExpected;
|
||||||
context->smstate->sm_prog_state = OTRL_SMP_PROG_OK;
|
|
||||||
OtrlUserState user_state = otr_userstate();
|
OtrlUserState user_state = otr_userstate();
|
||||||
OtrlMessageAppOps *ops = otr_messageops();
|
OtrlMessageAppOps *ops = otr_messageops();
|
||||||
GHashTable *smp_initiators = otr_smpinitators();
|
GHashTable *smp_initiators = otr_smpinitators();
|
||||||
@ -177,18 +130,15 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
|
|||||||
case OTRL_SMPEVENT_SUCCESS:
|
case OTRL_SMPEVENT_SUCCESS:
|
||||||
ui_smp_successful(context->username);
|
ui_smp_successful(context->username);
|
||||||
ui_trust(context->username);
|
ui_trust(context->username);
|
||||||
// otr_trust(context->username);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OTRL_SMPEVENT_FAILURE:
|
case OTRL_SMPEVENT_FAILURE:
|
||||||
if (nextMsg == OTRL_SMP_EXPECT3) {
|
if (nextMsg == OTRL_SMP_EXPECT3) {
|
||||||
ui_smp_unsuccessful_sender(context->username);
|
ui_smp_unsuccessful_sender(context->username);
|
||||||
ui_untrust(context->username);
|
ui_untrust(context->username);
|
||||||
// otr_untrust(context->username);
|
|
||||||
} else if (nextMsg == OTRL_SMP_EXPECT4) {
|
} else if (nextMsg == OTRL_SMP_EXPECT4) {
|
||||||
ui_smp_unsuccessful_receiver(context->username);
|
ui_smp_unsuccessful_receiver(context->username);
|
||||||
ui_untrust(context->username);
|
ui_untrust(context->username);
|
||||||
// otr_untrust(context->username);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -203,14 +153,12 @@ cb_handle_smp_event(void *opdata, OtrlSMPEvent smp_event,
|
|||||||
case OTRL_SMPEVENT_ABORT:
|
case OTRL_SMPEVENT_ABORT:
|
||||||
ui_smp_aborted(context->username);
|
ui_smp_aborted(context->username);
|
||||||
ui_untrust(context->username);
|
ui_untrust(context->username);
|
||||||
// otr_untrust(context->username);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OTRL_SMPEVENT_ASK_FOR_ANSWER:
|
case OTRL_SMPEVENT_ASK_FOR_ANSWER:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OTRL_SMPEVENT_IN_PROGRESS:
|
case OTRL_SMPEVENT_IN_PROGRESS:
|
||||||
ui_current_print_line("OTRL_SMPEVENT_IN_PROGRESS: %d", progress_percent);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user