how to modify the nullclient.c so the account can login the real xmpp server?

jimmy_yuhai jimmy_yuhai at 163.com
Thu Jul 24 23:00:40 EDT 2008


for example ,the jimmy_yuhai at jabber.org, how to modify the nullclient.c (see below), so the account can connect the real server?

just add purple_account_connect(PurpleAccount *account) seems not enough.

thanks so much ;-)
jimmy yuhai


------------------xml output on the console (debug level)--------------
imput username:hi at chsiyuhai/gaim ( chsiyuhai is the name my pc, i run openfire as the server)
password:******

......................

 in purple_blist_load()--jimmy
(16:48:17) util: Reading file blist.xml from directory /dev/null
(16:48:17) util: File /dev/null/blist.xml does not exist (this is not necessarily an error)
(16:48:17) prefs: Reading /dev/null/prefs.xml
(16:48:17) prefs: Reading /usr/local/etc/purple/prefs.xml
(16:48:17) prefs: Error reading prefs: Failed to open file '/usr/local/etc/purple/prefs.xml': No such file or directory
(16:48:17) prefs: purple_prefs_get_path_list: Unknown pref /purple/nullclient/plugins/saved
(16:48:17) pounce: Error reading pounces: Failed to open file '/dev/null/pounces.xml': Not a directory
libpurple initialized.
        0: AIM
        1: Bonjour
        2: Gadu-Gadu
        3: GroupWise
        4: ICQ
        5: IRC
        6: MSN
        7: MySpaceIM
        8: QQ
        9: SIMPLE
        10: XMPP
        11: Yahoo
        12: Zephyr
Select the protocol [0-12]: 10
Username: hi at chsiyuhai/gaim
Password: 
(16:48:31) account: Connecting to account hi at chsiyuhai/gaim

 purple_account_connect()'s purple_connection_new(), to login--bobob
 
 in purple_connection_new():regist: ----bobob
(16:48:31) prefs: /purple/savedstatus/default changed, scheduling save.
(16:48:31) prefs: /purple/savedstatus/idleaway changed, scheduling save.
(16:48:31) prefs: /purple/savedstatus/isidleaway changed, scheduling save.
(16:48:31) connection: Connecting. gc = 0x8083590
regist is FALSE
in jabber_login() of jabber.c--bobob
js->gc->account:,host:172.16.1.82,port:5222,

 in the jabber_login_connect() --bobob-08-05-27
(16:48:32) dns: DNS query for '172.16.1.82' queued
(16:48:32) account: Connecting to account hi at chsiyuhai/gaim

 purple_account_connect()'s purple_connection_new(), to login--bobob
 
 in purple_connection_new():regist: ----bobob
(16:48:32) connection: Connecting. gc = 0x8084300
regist is FALSE
in jabber_login() of jabber.c--bobob
js->gc->account:,host:172.16.1.82,port:5222,

.....................


 in jabber_login_callback() --bobob080527(16:48:32) jabber: Sending: <?xml version='1.0' ?>
(16:48:32) jabber: Sending: <stream:stream to='chsiyuhai' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
(16:48:32) proxy: Connected to 172.16.1.82:5222.

 in jabber_login_callback() --bobob080527(16:48:32) jabber: Sending: <?xml version='1.0' ?>
(16:48:32) jabber: Sending: <stream:stream to='chsiyuhai' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
(16:48:32) jabber: Recv (668): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="chsiyuhai" id="59150ece" xml:lang="en" version="1.0"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
(16:48:32) jabber: Sending: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
(16:48:32) jabber: Recv (668): <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="chsiyuhai" id="b9a23f7b" xml:lang="en" version="1.0"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
(16:48:32) jabber: Sending: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
(16:48:32) jabber: Recv (50): <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
(16:48:32) gnutls: Starting handshake with 172.16.1.82
(16:48:32) jabber: Recv (50): <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
(16:48:32) gnutls: Starting handshake with 172.16.1.82
(16:48:32) gnutls: Handshake complete
(16:48:32) gnutls/x509: Key print: 7c:d9:b4:10:78:be:bf:f6:6b:4b:f1:96:ca:ba:b1:02:79:8d:dc:61
(16:48:32) gnutls: Peer provided 1 certs
(16:48:32) gnutls: Lvl 0 SHA1 fingerprint: 7c:d9:b4:10:78:be:bf:f6:6b:4b:f1:96:ca:ba:b1:02:79:8d:dc:61
(16:48:32) gnutls: Serial: 1c:d1:e6:0c:88:35:27:d1
(16:48:32) gnutls: Cert DN: CN=chsiyuhai
(16:48:32) gnutls: Cert Issuer DN: CN=chsiyuhai
(16:48:32) certificate/x509/tls_cached: Starting verify for 172.16.1.82
(16:48:32) certificate: CertificatePool x509, tls_peers requested but not found.
(16:48:32) certificate/x509/tls_cached: Couldn't find local peers cache tls_peers
Prompting the user
(16:48:32) certificate/x509/tls_cached: Certificate for 172.16.1.82 is self-signed.
(16:48:32) gnutls: Handshake complete
(16:48:32) gnutls/x509: Key print: 7c:d9:b4:10:78:be:bf:f6:6b:4b:f1:96:ca:ba:b1:02:79:8d:dc:61
(16:48:32) gnutls: Peer provided 1 certs
(16:48:32) gnutls: Lvl 0 SHA1 fingerprint: 7c:d9:b4:10:78:be:bf:f6:6b:4b:f1:96:ca:ba:b1:02:79:8d:dc:61
(16:48:32) gnutls: Serial: 1c:d1:e6:0c:88:35:27:d1
(16:48:32) gnutls: Cert DN: CN=chsiyuhai
(16:48:32) gnutls: Cert Issuer DN: CN=chsiyuhai
(16:48:32) certificate/x509/tls_cached: Starting verify for 172.16.1.82
(16:48:32) certificate: CertificatePool x509, tls_peers requested but not found.
(16:48:32) certificate/x509/tls_cached: Couldn't find local peers cache tls_peers
Prompting the user
(16:48:32) certificate/x509/tls_cached: Certificate for 172.16.1.82 is self-signed.
(16:48:32) util: requested to fetch (http://172.16.1.193:2869/upnphost/udhisapi.dll?content=uuid:20e9833c-0016-4ee3-9016-6a3450035587), full=1, user_agent=((null)), http11=1
(16:48:32) dns: DNS query for '172.16.1.193' queued
(16:48:32) dns: Created new DNS child 11945, there are now 1 children.
(16:48:32) dns: Successfully sent DNS request to child 11945
(16:48:32) dns: Got response for '172.16.1.193'
(16:48:32) dnsquery: IP resolved for 172.16.1.193
(16:48:32) proxy: Attempting connection to 172.16.1.193
(16:48:32) proxy: Connecting to 172.16.1.193:2869 with no proxy
(16:48:32) proxy: Connection in progress
(16:48:32) proxy: Connected to 172.16.1.193:2869.
(16:48:32) util: Request: 'GET /upnphost/udhisapi.dll?content=uuid:20e9833c-0016-4ee3-9016-6a3450035587 HTTP/1.1
Connection: close
Host: 172.16.1.193:2869

'
(16:48:32) util: Response headers: 'HTTP/1.1 200 OK
Content-Length: 4092
Content-Type: text/xml
Server: Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0 Microsoft-HTTPAPI/1.0
Date: Thu, 24 Jul 2008 08:47:27 GMT
Connection: close

'
(16:48:32) util: parsed 4092
(16:48:32) util: requested to fetch (http://172.16.1.193:2869/upnphost/udhisapi.dll?control=uuid:dd362b54-fcbd-4fdf-917d-a98da91d6083+urn:upnp-org:serviceId:WANPPPConn1), full=0, user_agent=((null)), http11=1
(16:48:32) dns: DNS query for '172.16.1.193' queued
(16:48:32) dns: DNS query for '172.16.1.193' queued
(16:48:32) dns: Created new DNS child 11948, there are now 1 children.
(16:48:33) dns: Successfully sent DNS request to child 11948
(16:48:33) dns: Created new DNS child 11949, there are now 2 children.
(16:48:33) dns: Successfully sent DNS request to child 11949
(16:48:33) dns: Got response for '172.16.1.193'
(16:48:33) dnsquery: IP resolved for 172.16.1.193
(16:48:33) proxy: Attempting connection to 172.16.1.193
(16:48:33) proxy: Connecting to 172.16.1.193:2869 with no proxy
(16:48:33) proxy: Connection in progress
(16:48:33) proxy: Connected to 172.16.1.193:2869.
(16:48:33) util: Request: 'POST /upnphost/udhisapi.dll?control=uuid:dd362b54-fcbd-4fdf-917d-a98da91d6083+urn:upnp-org:serviceId:WANPPPConn1 HTTP/1.1
HOST: 172.16.1.193:2869
SOAPACTION: "urn:schemas-upnp-org:service:WANPPPConnection:1#GetExternalIPAddress"
CONTENT-TYPE: text/xml ; charset="utf-8"
CONTENT-LENGTH: 311

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANPPPConnection:1">
..........
.........................


-----------------------nullclient.c-------------------------------------------------------------
http://developer.pidgin.im/attachment/ticket/2520/nullclient.c



jimmy_yuhai
2008-07-25
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20080725/19d58e84/attachment.html>


More information about the Devel mailing list