- Timestamp:
- 2006-05-25T16:09:15Z (19 years ago)
- Branches:
- master
- Children:
- 1705ec3
- Parents:
- 51a4ffb (diff), 0a69d7b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- protocols
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.h
r51a4ffb rb1bd100 52 52 #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ 53 53 54 #define WEBSITE "http://www.bitl ee.org/"54 #define WEBSITE "http://www.bitlbee.org/" 55 55 #define IM_FLAG_AWAY 0x0020 56 56 #define OPT_CONN_HTML 0x00000001 -
protocols/ssl_sspi.c
r51a4ffb rb1bd100 48 48 }; 49 49 50 static void ssl_connected( gpointer data, gint source, GaimInputCondition cond);50 static void ssl_connected(gpointer, gint, GaimInputCondition); 51 51 52 52 void sspi_global_init( void ) … … 63 63 { 64 64 struct scd *conn = g_new0( struct scd, 1 ); 65 66 conn->fd = proxy_connect( host, port, ssl_connected, conn ); 67 conn->func = func; 68 conn->data = data; 69 conn->inpa = -1; 70 71 if( conn->fd < 0 ) 72 { 73 g_free( conn ); 74 return( NULL ); 75 } 76 77 if( !initialized ) 78 { 79 sspi_global_init(); 80 initialized = TRUE; 81 atexit( sspi_global_deinit ); 82 } 83 84 return conn; 85 } 86 87 static void ssl_connected(gpointer data, gint fd, GaimInputCondition cond) 88 { 89 struct scd *conn = data; 65 90 SCHANNEL_CRED ssl_cred; 66 91 TimeStamp timestamp; … … 72 97 ISC_REQ_MANUAL_CRED_VALIDATION; 73 98 ULONG a; 74 75 conn->fd = proxy_connect( host, port, ssl_connected, conn );76 conn->func = func;77 conn->data = data;78 conn->inpa = -1;79 80 if( conn->fd < 0 )81 {82 g_free( conn );83 return( NULL );84 }85 86 if( !initialized )87 {88 sspi_global_init();89 initialized = TRUE;90 atexit( sspi_global_deinit );91 }92 99 93 100 memset(&ssl_cred, 0, sizeof(SCHANNEL_CRED)); … … 97 104 SECURITY_STATUS st = AcquireCredentialsHandle(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, &ssl_cred, NULL, NULL, &conn->cred, ×tamp); 98 105 99 if (st != SEC_E_OK) 100 return NULL; 106 if (st != SEC_E_OK) { 107 conn->func( conn->data, NULL, cond ); 108 return; 109 101 110 102 111 do { 103 112 /* initialize buffers */ 104 113 ibuf[0].cbBuffer = size; ibuf[0].pvBuffer = buf; 105 ibuf[1].cbBuffer = 0; ibuf[1].pvBuffer = N IL;106 obuf[0].cbBuffer = 0; obuf[0].pvBuffer = N IL;114 ibuf[1].cbBuffer = 0; ibuf[1].pvBuffer = NULL; 115 obuf[0].cbBuffer = 0; obuf[0].pvBuffer = NULL; 107 116 ibuf[0].BufferType = obuf[0].BufferType = SECBUFFER_TOKEN; 108 117 ibuf[1].BufferType = SECBUFFER_EMPTY; … … 127 136 128 137 QueryContextAttributes(&conn->context, SECPKG_ATTR_STREAM_SIZES, &conn->sizes); 129 130 131 return( conn);138 } while (1); 139 140 conn->func( conn->data, conn, cond ); 132 141 } 133 142 … … 233 242 DeleteSecurityContext(&scd->context); 234 243 235 FreeCredential Handle(&scd->cred);244 FreeCredentialsHandle(&scd->cred); 236 245 237 246 closesocket( scd->fd );
Note: See TracChangeset
for help on using the changeset viewer.