Changeset 4609
- Timestamp:
- 02/13/07 22:05:40 (1 year ago)
- Files:
-
- wire/branches/p7/wire/client.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wire/branches/p7/wire/client.c
r4423 r4609 141 141 static wi_socket_context_t *wr_socket_context; 142 142 143 static wi_p7_spec_t *wr_p7_spec; 144 143 145 wi_socket_t *wr_socket; 144 146 wi_address_t *wr_address; … … 161 163 wr_socket_context = wi_socket_context_init(wi_socket_context_alloc()); 162 164 163 if(!wi_socket_context_set_ssl_type(wr_socket_context, WI_SOCKET_SSL_CLIENT))164 wi_log_err(WI_STR("Could not set SSL context: %m"));165 // if(!wi_socket_context_set_ssl_type(wr_socket_context, WI_SOCKET_SSL_CLIENT)) 166 // wi_log_err(WI_STR("Could not set SSL context: %m")); 165 167 166 168 options = WI_STRING_ENCODING_IGNORE | WI_STRING_ENCODING_TRANSLITERATE; … … 175 177 176 178 wr_icon = wi_string_init_with_cstring(wi_string_alloc(), wr_default_icon); 179 180 wr_p7_spec = wi_p7_spec_init_with_file(wi_p7_spec_alloc(), WI_STR("protocol.xml"), true); 181 182 if(!wr_p7_spec) 183 wr_printf_prefix(WI_STR("Could not load protocol.xml: %m")); 177 184 } 178 185 … … 186 193 wi_address_t *address; 187 194 wi_socket_t *socket; 195 wi_p7_socket_t *p7_socket; 188 196 wi_string_t *ip; 189 197 … … 222 230 goto next; 223 231 } 224 225 wr_printf_prefix(WI_STR("Connected using %@/%@/%u bits, logging in..."), 232 233 p7_socket = wi_p7_socket_init_with_socket(wi_p7_socket_alloc(), socket, wr_p7_spec); 234 235 if(!wi_p7_socket_connect(p7_socket, 10.0, WI_P7_COMPRESSION_DEFLATE | WI_P7_ENCRYPTION_RSA_BF, WI_P7_BINARY, WI_STR("guest"), WI_STR(""))) { 236 wr_printf_prefix(WI_STR("Could not connect to %@: %m"), ip); 237 238 goto next; 239 } 240 241 /* wr_printf_prefix(WI_STR("Connected using %@/%@/%u bits, logging in..."), 226 242 wi_socket_cipher_version(socket), 227 243 wi_socket_cipher_name(socket), 228 wi_socket_cipher_bits(socket)); 244 wi_socket_cipher_bits(socket));*/ 245 wr_printf_prefix(WI_STR("Connected, logging in...")); 229 246 230 247 wr_connected = true; … … 461 478 string = wi_string_init_with_format_and_arguments(wi_string_alloc(), fmt, ap); 462 479 va_end(ap); 463 480 464 481 wi_string_convert_encoding(string, wr_client_string_encoding, wr_server_string_encoding); 465 482
