Changeset f9258ae for protocols/msn
- Timestamp:
- 2012-09-16T11:52:35Z (12 years ago)
- Branches:
- master
- Children:
- 080c43a
- Parents:
- bc676ac
- Location:
- protocols/msn
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn.c
rbc676ac rf9258ae 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-201 0Wilmer van der Gaast and others *4 * Copyright 2002-2012 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 98 98 g_free( md->lock_key ); 99 99 g_free( md->pp_policy ); 100 g_free( md->uuid ); 100 101 101 102 while( md->groups ) -
protocols/msn/msn.h
rbc676ac rf9258ae 123 123 char *tokens[4]; 124 124 char *lock_key, *pp_policy; 125 char *uuid; 125 126 126 127 GSList *msgq, *grpq, *soapq; -
protocols/msn/ns.c
rbc676ac rf9258ae 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-201 0Wilmer van der Gaast and others *4 * Copyright 2002-2012 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 25 25 26 26 #include <ctype.h> 27 #include <sys/utsname.h> 27 28 #include "nogaim.h" 28 29 #include "msn.h" 29 30 #include "md5.h" 31 #include "sha1.h" 30 32 #include "soap.h" 31 33 #include "xmltree.h" … … 110 112 handler->rxlen = 0; 111 113 handler->rxq = g_new0( char, 1 ); 114 115 if( md->uuid == NULL ) 116 { 117 struct utsname name; 118 sha1_state_t sha[1]; 119 120 /* UUID == SHA1("BitlBee" + my hostname + MSN username) */ 121 sha1_init( sha ); 122 sha1_append( sha, (void*) "BitlBee", 7 ); 123 if( uname( &name ) == 0 ) 124 { 125 sha1_append( sha, (void*) name.nodename, strlen( name.nodename ) ); 126 } 127 sha1_append( sha, (void*) ic->acc->user, strlen( ic->acc->user ) ); 128 md->uuid = sha1_random_uuid( sha ); 129 memcpy( md->uuid, "b171be3e", 8 ); /* :-P */ 130 } 112 131 113 132 if( msn_ns_write( ic, source, "VER %d %s CVR0\r\n", ++md->trId, MSNP_VER ) ) … … 757 776 if( token ) 758 777 { 759 msn_ns_write( ic, -1, "USR %d SSO S %s %s { 7535ef7c-ff92-11e1-8069-50e5493b06de}\r\n", ++md->trId, md->tokens[0], token);778 msn_ns_write( ic, -1, "USR %d SSO S %s %s {%s}\r\n", ++md->trId, md->tokens[0], token, md->uuid ); 760 779 } 761 780 else
Note: See TracChangeset
for help on using the changeset viewer.