Changeset 8a9afe4 for protocols/ssl_gnutls.c
- Timestamp:
- 2005-12-17T16:54:12Z (19 years ago)
- Branches:
- master
- Children:
- 52b3a99
- Parents:
- 3d64e5b (diff), dd9a51b (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/ssl_gnutls.c
r3d64e5b r8a9afe4 117 117 if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) 118 118 { 119 conn->inpa = gaim_input_add( conn->fd, 120 gnutls_record_get_direction( conn->session ) ? 121 GAIM_INPUT_WRITE : GAIM_INPUT_READ, 119 conn->inpa = gaim_input_add( conn->fd, ssl_getdirection( conn ), 122 120 ssl_handshake, data ); 123 121 } … … 145 143 int ssl_read( void *conn, char *buf, int len ) 146 144 { 145 int st; 146 147 147 if( !((struct scd*)conn)->established ) 148 148 { … … 151 151 } 152 152 153 return( gnutls_record_recv( ((struct scd*)conn)->session, buf, len ) ); 154 153 st = gnutls_record_recv( ((struct scd*)conn)->session, buf, len ); 154 155 ssl_errno = SSL_OK; 156 if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) 157 ssl_errno = SSL_AGAIN; 158 159 return st; 155 160 } 156 161 157 162 int ssl_write( void *conn, const char *buf, int len ) 158 163 { 164 int st; 165 159 166 if( !((struct scd*)conn)->established ) 160 167 { … … 163 170 } 164 171 165 return( gnutls_record_send( ((struct scd*)conn)->session, buf, len ) ); 172 st = gnutls_record_send( ((struct scd*)conn)->session, buf, len ); 173 174 ssl_errno = SSL_OK; 175 if( st == GNUTLS_E_AGAIN || st == GNUTLS_E_INTERRUPTED ) 176 ssl_errno = SSL_AGAIN; 177 178 return st; 166 179 } 167 180 … … 184 197 return( ((struct scd*)conn)->fd ); 185 198 } 199 200 GaimInputCondition ssl_getdirection( void *conn ) 201 { 202 return( gnutls_record_get_direction( ((struct scd*)conn)->session ) ? 203 GAIM_INPUT_WRITE : GAIM_INPUT_READ ); 204 }
Note: See TracChangeset
for help on using the changeset viewer.