- Timestamp:
- 2013-08-02T11:15:21Z (11 years ago)
- Branches:
- master
- Children:
- 22ec21d
- Parents:
- b939cff
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
otr.c
rb939cff r6d9f0ba 87 87 const char *message, gcry_error_t err); 88 88 89 const char *op_otr_error_message(void *opdata, ConnContext *ctx, 90 OtrlErrorCode err_code); 91 89 92 /** otr sub-command handlers: **/ 90 93 … … 229 232 /* stuff added with libotr 4.0.0 */ 230 233 otr_ops.received_symkey = NULL; /* we don't use the extra key */ 231 otr_ops.otr_error_message = NULL; // TODO?234 otr_ops.otr_error_message = &op_otr_error_message; 232 235 otr_ops.otr_error_message_free = NULL; 233 otr_ops.resent_msg_prefix = NULL; / / don't need?236 otr_ops.resent_msg_prefix = NULL; /* default: [resent] */ 234 237 otr_ops.resent_msg_prefix_free = NULL; 235 238 otr_ops.handle_smp_event = &op_handle_smp_event; … … 861 864 /* ignore XXX log? */ 862 865 break; 866 } 867 } 868 869 const char *op_otr_error_message(void *opdata, ConnContext *ctx, 870 OtrlErrorCode err_code) 871 { 872 switch(err_code) { 873 case OTRL_ERRCODE_ENCRYPTION_ERROR: 874 return "i failed to encrypt a message"; 875 case OTRL_ERRCODE_MSG_NOT_IN_PRIVATE: 876 return "you sent an encrypted message i didn't expect"; 877 case OTRL_ERRCODE_MSG_UNREADABLE: 878 return "could not read encrypted message"; 879 case OTRL_ERRCODE_MSG_MALFORMED: 880 return "you sent a malformed OTR message"; 881 default: 882 return "i suffered an unexpected OTR error"; 863 883 } 864 884 }
Note: See TracChangeset
for help on using the changeset viewer.