[OTR-dev] Patch for account display name
Evan Schoenberg
evan.s at dreskin.net
Fri Dec 22 16:58:30 EST 2006
On Dec 22, 2006, at 4:39 PM, Ian Goldberg wrote:
> I didn't see a previous mail about this. But this looks plausible.
> I'll wait until after the holidays to apply and test it and stuff,
> though.
I'm not sure what happened to it.
Here it is again:
In libotr, contexts are often referred to be their account name and
protocol, such as:
format = "?OTR Error: You sent encrypted "
"data to %s, who wasn't expecting it.";
buf = malloc(strlen(format) + strlen(context->accountname)
- 1);
if (buf) {
sprintf(buf, format, context->accountname);
accountname and protocol are intended to be how to associate the
context with a particular messaging account in the client. However,
to make that association, since a client can have multiple accounts
with the same accountname and protocol, I use accountname to store a
unique identifier for the account (a number). Obviously, this
results in error messages which are nonsense:
OTR Error: You sent encrypted data to 5, who wasn't expecting it.
<and a dumb proposal here, which isn't as good as the patch>
> What is the function you're passing in there for Adium X? Is gaim
> likely to use the same function? If so, it should probably go in the
> UI-independent part of gaim-otr.
I'm not sure what gaim would use in terms of uniquely identifying an
account; certainly gaim does support having multiple accounts with
the same name on the same protocol.
Cheers,
Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20061222/055fcb20/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20061222/055fcb20/attachment.pgp>
More information about the OTR-dev
mailing list