Commit 42d9dc06 authored by jehan's avatar jehan

fix compilation issue

parent c23e2d10
......@@ -317,10 +317,11 @@ static int tls_process_http_connect(belle_sip_tls_channel_t *obj) {
,ip);
if (lp->http_proxy_username && lp->http_proxy_passwd) {
char username_passwd = belle_sip_strdup_printf("%s:%s",lp->http_proxy_username,lp->http_proxy_passwd);
char *username_passwd = belle_sip_strdup_printf("%s:%s",lp->http_proxy_username,lp->http_proxy_passwd);
size_t username_passwd_length = strlen(username_passwd);
size_t encoded_username_paswd_length = username_passwd_length*2;
unsigned char *encoded_username_paswd = belle_sip_malloc(2*username_passwd_length);
base64_encode(encoded_username_paswd,2*username_passwd_length,username_passwd,username_passwd_length);
base64_encode(encoded_username_paswd,&encoded_username_paswd_length,(const unsigned char *)username_passwd,username_passwd_length);
belle_sip_strcat_printf(request, "Proxy-Authorization: Basic %s\r\n",encoded_username_paswd);
belle_sip_free(username_passwd);
belle_sip_free(encoded_username_paswd);
......
......@@ -761,7 +761,7 @@ test_t register_tests[] = {
{ "Stateful TCP", stateful_register_tcp },
{ "Stateful TLS", stateful_register_tls },
{ "Stateful TLS with http proxy", stateful_register_tls_with_http_proxy },
{ "Stateful TLS with wong http proxy", stateful_register_tls_with_wrong_http_proxy },
{ "Stateful TLS with wrong http proxy", stateful_register_tls_with_wrong_http_proxy },
{ "Stateless UDP", stateless_register_udp },
{ "Stateless TCP", stateless_register_tcp },
{ "Stateless TLS", stateless_register_tls },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment