Mercurial > pidgin.yaz
annotate doc/connection-signals.dox @ 23995:85bed17fe5c1
The variable we use to keep track of the watcher of the ssl connection
should be unsigned. This isn't really a problem in Pidgin, where we
use glib's mainloop and GIOChannels because glib starts assigning the
handle IDs sequentially starting from 1.
But if an eventloop implementation ever returns a handle ID greater
than the largest possible signed integer (2,147,483,647) then we
won't be able to remove the watcher because purple_ssl_close() in
sslconn.c only removes it if inpa > 0, and since it interprets inpa
as a signed value then handles over 2,147,483,647 appear as negative
numbers.
I stumbled upon this when playing around with libevent, which can
use epoll. My implementation generated a random handle ID which
was sometimes greater than 2,147,483,647.
I don't believe this breaks binary compatibility. And I don't think
it breaks source compatibility, but I guess it might depend on what
compiler you're using.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 04 Sep 2008 18:04:29 +0000 |
parents | 95a7d1a72fd9 |
children | 73c8e1964eef |
rev | line source |
---|---|
6724
aca39e77db85
[gaim-migrate @ 7251]
Christian Hammond <chipx86@chipx86.com>
parents:
6611
diff
changeset
|
1 /** @page connection-signals Connection Signals |
6611 | 2 |
3 @signals | |
4 @signal signing-on | |
5 @signal signed-on | |
6 @signal signing-off | |
7 @signal signed-off | |
23588
95a7d1a72fd9
A2B in #pidgin noticed that the link was missing
Ka-Hing Cheung <khc@hxbc.us>
parents:
21365
diff
changeset
|
8 @signal connection-error |
6611 | 9 @endsignals |
10 | |
20807
e0613cf8c493
Add some links from signal documentation back to the documentation for the
Will Thompson <will.thompson@collabora.co.uk>
parents:
16183
diff
changeset
|
11 @see connection.h |
e0613cf8c493
Add some links from signal documentation back to the documentation for the
Will Thompson <will.thompson@collabora.co.uk>
parents:
16183
diff
changeset
|
12 |
6611 | 13 <hr> |
14 | |
15 @signaldef signing-on | |
16 @signalproto | |
16183
8cf53d7a0887
Update the Doxygen signals documentation to match the new struct names.
Richard Laager <rlaager@wiktel.com>
parents:
6724
diff
changeset
|
17 void (*signing_on)(PurpleConnection *gc); |
6611 | 18 @endsignalproto |
19 @signaldesc | |
20 Emitted when a connection is about to sign on. | |
21 @param gc The connection that is about to sign on. | |
22 @endsignaldef | |
23 | |
24 @signaldef signed-on | |
25 @signalproto | |
16183
8cf53d7a0887
Update the Doxygen signals documentation to match the new struct names.
Richard Laager <rlaager@wiktel.com>
parents:
6724
diff
changeset
|
26 void (*signed_on)(PurpleConnection *gc); |
6611 | 27 @endsignalproto |
28 @signaldesc | |
29 Emitted when a connection has signed on. | |
30 @param gc The connection that has signed on. | |
31 @endsignaldef | |
32 | |
33 @signaldef signing-off | |
34 @signalproto | |
16183
8cf53d7a0887
Update the Doxygen signals documentation to match the new struct names.
Richard Laager <rlaager@wiktel.com>
parents:
6724
diff
changeset
|
35 void (*signing_off)(PurpleConnection *gc); |
6611 | 36 @endsignalproto |
37 @signaldesc | |
38 Emitted when a connection is about to sign off. | |
39 @param gc The connection that is about to sign off. | |
40 @endsignaldef | |
41 | |
42 @signaldef signed-off | |
43 @signalproto | |
16183
8cf53d7a0887
Update the Doxygen signals documentation to match the new struct names.
Richard Laager <rlaager@wiktel.com>
parents:
6724
diff
changeset
|
44 void (*signed_off)(PurpleConnection *gc); |
6611 | 45 @endsignalproto |
46 @signaldesc | |
47 Emitted when a connection has signed off. | |
48 @param gc The connection that has signed off. | |
49 @endsignaldef | |
50 | |
21365
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
51 @signaldef connection-error |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
52 @signalproto |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
53 void (*connection_error)(PurpleConnection *gc, PurpleConnectionError err, const gchar *desc) |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
54 @endsignalproto |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
55 @signaldesc |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
56 Emitted when a connection error occurs, before @ref signed-off. |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
57 @param gc The connection on which the error has occured |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
58 @param err The error that occured |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
59 @param desc A description of the error, giving more information. |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
60 @endsignaldef |
3a269007711e
Document connection-error signal.
Will Thompson <will.thompson@collabora.co.uk>
parents:
20807
diff
changeset
|
61 |
6611 | 62 */ |
20807
e0613cf8c493
Add some links from signal documentation back to the documentation for the
Will Thompson <will.thompson@collabora.co.uk>
parents:
16183
diff
changeset
|
63 // vim: syntax=c.doxygen tw=75 et |