X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=connection_cbs.pxd;h=1fc35d609f7aeac73dd7023b3495116f5f6c5cad;hp=463b17a1582a87db725a3509fe81e16879f73a0e;hb=d498550db3bfd489d8319e7342cc10b76cf24ac9;hpb=e2eef524bf0c883406b15674eac0769c017d35c6 diff --git a/connection_cbs.pxd b/connection_cbs.pxd index 463b17a..1fc35d6 100644 --- a/connection_cbs.pxd +++ b/connection_cbs.pxd @@ -98,7 +98,7 @@ cdef void network_disconnected(): ( connection_cbs["network-disconnected"])() cdef void report_disconnect_reason(connection.PurpleConnection *gc, \ - connection.PurpleConnectionError reason, const_char *text): + connection.PurpleConnectionError reason, const_char *c_text): """ Called when an error causes a connection to be disconnected. Called before disconnected. This op is intended to replace report_disconnect. @@ -132,5 +132,10 @@ cdef void report_disconnect_reason(connection.PurpleConnection *gc, \ 15: 'Certificate error (other)', 16: 'Other error' }[reason] + if c_text: + text = c_text + else: + text = None + if connection_cbs.has_key("report-disconnect-reason"): ( connection_cbs["report-disconnect-reason"])(reason_string, text)