Commit 98d94edf authored by Pekka Pessi's avatar Pekka Pessi

Removed // comments.

darcs-hash:20060426071011-65a35-8c29e1f0cc410f86ad0ffa54dc81f0b59eeb2e11.gz
parent e077e52f
......@@ -277,9 +277,6 @@ int http_extract_chunk(msg_t *msg, http_t *http, char b[], int bsiz, int eos)
return b - b0;
}
// if (bsiz == n + crlf)
// return 0;
b += n + crlf, bsiz -= n + crlf;
/* Extract chunk */
......
......@@ -1339,7 +1339,6 @@ static int http_chunk_test(void)
TEST_1(http->http_status);
TEST_1(http->http_payload);
TEST_1(http->http_payload->pl_next);
// TEST(http->http_payload->pl_next->pl_next, NULL);
TEST_1(http->http_date);
msg_destroy(msg);
......@@ -1371,7 +1370,6 @@ static int http_chunk_test(void)
TEST_1(http->http_status);
TEST_1(http->http_payload);
TEST_1(http->http_payload->pl_next);
// TEST(http->http_payload->pl_next->pl_next, NULL);
TEST_1(http->http_date);
msg_destroy(msg);
......@@ -1403,7 +1401,6 @@ static int http_chunk_test(void)
TEST_1(http->http_status);
TEST_1(http->http_payload);
TEST_1(http->http_payload->pl_next);
// TEST(http->http_payload->pl_next->pl_next, NULL);
TEST_1(http->http_date);
msg_destroy(msg);
......
......@@ -189,7 +189,7 @@ struct nea_sub_s {
sip_from_t *s_from;
sip_contact_t *s_remote; /**< Remote contact */
// sip_accept_t *s_accept;
/* sip_accept_t *s_accept; */
sip_event_t *s_id;
nea_event_t *s_event;
......@@ -1885,7 +1885,7 @@ int nea_sub_process_subscribe(nea_sub_t *s,
if (s->s_subscribed == 0)
s->s_subscribed = now;
s->s_expires = now + delta;
// s->s_accept = sip_accept_dup(home, accept);
/* s->s_accept = sip_accept_dup(home, accept); */
if (s->s_id == NULL)
s->s_id = sip_event_dup(home, sip->sip_event);
s->s_event = ev;
......
......@@ -1247,8 +1247,8 @@ char const *stateless_branch(nta_agent_t *sa,
}
if (sip->sip_to) {
url_update(md5, sip->sip_to->a_url);
// XXX - some broken implementations include To tag in CANCEL
// su_md5_str0update(md5, sip->sip_to->a_tag);
/* XXX - some broken implementations include To tag in CANCEL */
/* su_md5_str0update(md5, sip->sip_to->a_tag); */
}
if (sip->sip_cseq) {
uint32_t cseq = htonl(sip->sip_cseq->cs_seq);
......
......@@ -495,7 +495,6 @@ int test_init(agent_t *ag, char const *resolv_conf)
{
/* Initialize our headers */
// msg_param_t from_params[2] = { "tag=fdeadbeef", NULL };
sip_from_t from[1];
sip_to_t to[1];
sip_contact_t m[1];
......@@ -516,8 +515,6 @@ int test_init(agent_t *ag, char const *resolv_conf)
to->a_url->url_port = NULL;
TEST_1(ag->ag_bob = sip_to_dup(ag->ag_home, to));
// url_strip_transport(ag->ag_bob->a_url);
*m->m_url = *ag->ag_contact->m_url;
m->m_url->url_user = "alice";
TEST_1(ag->ag_m_alice = sip_contact_dup(ag->ag_home, m));
......@@ -526,10 +523,7 @@ int test_init(agent_t *ag, char const *resolv_conf)
*from->a_url = *ag->ag_contact->m_url;
from->a_url->url_user = "alice";
from->a_url->url_port = NULL;
// from->a_params = from_params;
TEST_1(ag->ag_alice = sip_from_dup(ag->ag_home, from));
// url_strip_transport(ag->ag_alice->a_url);
}
{
char const data[] =
......
......@@ -315,7 +315,6 @@ int api_test_init(agent_t *ag)
{
/* Initialize our headers */
// msg_param_t from_params[2] = { "tag=fdeadbeef", NULL };
sip_from_t from[1];
sip_to_t to[1];
sip_contact_t m[1];
......
......@@ -91,7 +91,6 @@ int main(int argc, char *argv[])
int o_extra = 0;
int o_timeout = 300;
char *s;
//char const *tls_cert_path = getenv("TPORT_CERTIFICATE");
c = context;
su_init();
......
......@@ -670,16 +670,18 @@ nth_client_t *nth_client_tcreate(nth_engine_t * engine,
if (hc)
hc->hc_expires = expires;
if (hc == NULL);
else if (http_add_tl(msg, http,
//HTTPTAG_CONNECTION((http_connection_t *)-1),
//HTTPTAG_CONNECTION_STR("close"),
ta_tags(ta)) < 0);
if (hc == NULL)
;
else if (http_add_tl(msg, http, ta_tags(ta)) < 0)
;
else if (!(uri = hc_request_complete(hc, msg, http,
method, name, uri, version,
nth_client_url(template))));
else if (auc && hc_request_authenticate(hc, msg, http, uri, auc) <= 0);
else if (hc_resolve_and_send(hc) < 0);
nth_client_url(template))))
;
else if (auc && hc_request_authenticate(hc, msg, http, uri, auc) <= 0)
;
else if (hc_resolve_and_send(hc) < 0)
;
else
ok = 1;
......
......@@ -377,8 +377,6 @@ refresh_subscribe(nua_handle_t *nh, nua_dialog_usage_t *du, sip_time_t now)
SIP_METHOD_SUBSCRIBE,
NUTAG_USE_DIALOG(1),
NUTAG_ADD_CONTACT(1),
//SIPTAG_EVENT(du->du_event),
//SIPTAG_SUPPORTED(nh->nh_supported),
TAG_IF(du->du_terminating,
SIPTAG_EXPIRES_STR("0")),
TAG_END());
......
......@@ -1332,10 +1332,8 @@ void sdp_media_type(sdp_media_t *m, char const *s)
m->m_type = sdp_media_control, m->m_type_name = "control";
else if (strcasecmp(s, "message") == 0)
m->m_type = sdp_media_message, m->m_type_name = "message";
// Addition for JPIP - START
else if (strcasecmp(s, "image") == 0)
m->m_type = sdp_media_image, m->m_type_name = "image";
// Addition for JPIP - END
else
m->m_type = sdp_media_x, m->m_type_name = s;
}
......
......@@ -1255,7 +1255,6 @@ static int parser_test(void)
sip_via_t sip_via[1] = { SIP_VIA_INIT() };
sip_route_t sip_route[1] = { SIP_ROUTE_INIT() };
sip_record_route_t sip_record_route[1] = { SIP_RECORD_ROUTE_INIT() };
// sip_hide_t sip_hide[1] = { SIP_HIDE_INIT() };
sip_max_forwards_t sip_max_forwards[1] = { SIP_MAX_FORWARDS_INIT() };
sip_from_t sip_from[1] = { SIP_FROM_INIT() };
sip_to_t sip_to[1] = { SIP_TO_INIT() };
......@@ -1270,7 +1269,6 @@ static int parser_test(void)
sip_subject_t sip_subject[1] = { SIP_SUBJECT_INIT() };
sip_priority_t sip_priority[1] = { SIP_PRIORITY_INIT() };
// sip_also_t sip_also[1] = { SIP_ALSO_INIT() };
sip_call_info_t sip_call_info[1] = { SIP_CALL_INFO_INIT() };
sip_organization_t sip_organization[1] = { SIP_ORGANIZATION_INIT() };
sip_server_t sip_server[1] = { SIP_SERVER_INIT() };
......@@ -1378,7 +1376,6 @@ static int parser_test(void)
TEST(msg_header_offset(msg, sip, sip_via), &sip->sip_via);
TEST(msg_header_offset(msg, sip, sip_route), &sip->sip_route);
TEST(msg_header_offset(msg, sip, sip_record_route), &sip->sip_record_route);
// TEST(msg_header_offset(msg, sip, sip_hide), &sip->sip_hide);
TEST(msg_header_offset(msg, sip, sip_max_forwards), &sip->sip_max_forwards);
TEST(msg_header_offset(msg, sip, sip_from), &sip->sip_from);
TEST(msg_header_offset(msg, sip, sip_to), &sip->sip_to);
......@@ -1393,7 +1390,6 @@ static int parser_test(void)
TEST(msg_header_offset(msg, sip, sip_subject), &sip->sip_subject);
TEST(msg_header_offset(msg, sip, sip_priority), &sip->sip_priority);
// TEST(msg_header_offset(msg, sip, sip_also), &sip->sip_also);
TEST(msg_header_offset(msg, sip, sip_call_info), &sip->sip_call_info);
TEST(msg_header_offset(msg, sip, sip_organization), &sip->sip_organization);
TEST(msg_header_offset(msg, sip, sip_server), &sip->sip_server);
......@@ -1442,7 +1438,6 @@ static int parser_test(void)
TEST(sip_record_route_class->hc_params,
offsetof(sip_record_route_t, r_params));
// TEST(sip_hide_class->hc_params, 0);
TEST(sip_max_forwards_class->hc_params, 0);
TEST(sip_from_class->hc_params, offsetof(sip_from_t, a_params));
TEST(sip_to_class->hc_params, offsetof(sip_to_t, a_params));
......@@ -1458,7 +1453,6 @@ static int parser_test(void)
TEST(sip_subject_class->hc_params, 0);
TEST(sip_priority_class->hc_params, 0);
// TEST(sip_also_class->hc_params, 0);
TEST(sip_call_info_class->hc_params,
offsetof(sip_call_info_t, ci_params));
TEST(sip_organization_class->hc_params, 0);
......@@ -1603,7 +1597,6 @@ static int sip_header_test(void)
TEST(count(sip->sip_content_type->c_common), 1);
TEST(count(sip->sip_route->r_common), 0);
TEST(count(sip->sip_record_route->r_common), 4);
//TEST(count(sip->sip_hide->g_common), 1);
TEST(count(sip->sip_unknown->un_common), 2);
TEST(count(sip->sip_error->er_common), 1);
TEST(count(sip->sip_max_forwards->mf_common), 1);
......@@ -1623,9 +1616,6 @@ static int sip_header_test(void)
v0 = sip->sip_via;
//TEST_1(m = sip_contact_create_from_via(home, v0, "joe"));
//TEST_S(m->m_url->url_user, "joe");
TEST_1(v = sip_via_copy(home, v0));
TEST(len(v->v_common), len(v0->v_common));
for (; v && v0; v = v->v_next, v0 = v0->v_next) {
......@@ -1911,7 +1901,6 @@ static int test_content_disposition(void)
TEST_1(cd->cd_params && cd->cd_params[0] && cd->cd_params[1] && !cd->cd_params[2]);
TEST_S(cd->cd_params[0], "action=store");
TEST_S(cd->cd_params[1], "handling=required");
//TEST_S(cd->cd_action, "store");
TEST_S(cd->cd_handling, "required");
TEST_1(cd->cd_required);
TEST_1(!cd->cd_optional);
......@@ -2340,9 +2329,9 @@ static int test_route(void)
END();
}
/* Test Request-Disposition header */
int test_request_disposition(void)
{
// Test Request-Disposition header
sip_request_disposition_t *rd;
su_home_t *home;
......
......@@ -1067,7 +1067,7 @@ int test_cache(sres_context_t *ctx)
case 50:
TEST(rr_naptr->na_record->r_type, sres_type_naptr);
TEST(rr_naptr->na_record->r_class, sres_class_in);
// TEST(rr_naptr->na_record->r_ttl, 60);
TEST(rr_naptr->na_record->r_ttl, 60);
TEST(rr_naptr->na_order, 50);
TEST(rr_naptr->na_prefer, 15);
TEST_S(rr_naptr->na_flags, "u");
......@@ -1198,8 +1198,6 @@ int test_cache(sres_context_t *ctx)
TEST(rr_cname->cname_record->r_class, sres_class_in);
TEST(rr_cname->cname_record->r_ttl, 60);
TEST_S(rr_cname->cn_cname, "sip00.example.com.");
// XXX - this also returns AAAA record for sip00
//TEST(result[1], NULL);
sres_free_answers(res, result);
......
......@@ -2827,7 +2827,7 @@ int stun_test_lifetime(stun_handle_t *sh,
/* If no server given, use default address from stun_handle_create() */
if (!server) {
//memcpy(&sd->sd_pri_info, &sh->sh_pri_info, sizeof(su_addrinfo_t));
/* memcpy(&sd->sd_pri_info, &sh->sh_pri_info, sizeof(su_addrinfo_t)); */
memcpy(sd->sd_pri_addr, sh->sh_pri_addr, sizeof(su_sockaddr_t));
}
else {
......
......@@ -44,8 +44,7 @@
#include "sofia-sip/su_time.h"
#endif
#if SU_HAVE_POLL
//#include <stropts.h> /* stream operations */
#include <sys/poll.h> /* poll is part of streams */
#include <sys/poll.h>
#endif
SOFIA_BEGIN_DECLS
......
......@@ -381,8 +381,9 @@ void *sub_alloc(su_home_t *home,
else
n = 0, n2 = SUB_N, used = 0;
// assert(n2 % SUB_P != 0);
// printf("su_alloc(home = %p): realloc block hash of size %d\n", home, n2);
#if 0
printf("su_alloc(home = %p): realloc block hash of size %d\n", home, n2);
#endif
if (!(b2 = su_hash_alloc(n2)))
return NULL;
......
......@@ -1245,7 +1245,7 @@ int win_localinfo(su_localinfo_t const hints[1], su_localinfo_t **rresult)
if ((hints->li_scope && (hints->li_scope & scope) == 0) ||
(hints->li_family && hints->li_family != su->su_family) ||
// (hints->li_ifname && strcmp(hints->li_ifname, ifname) != 0) ||
/* (hints->li_ifname && strcmp(hints->li_ifname, ifname) != 0) || */
(hints->li_index && hints->li_index != if_index))
continue;
......
......@@ -132,7 +132,7 @@ enum {
};
struct tport_pending_s {
// tport_pending_t *p_left, *p_right, *p_parent;
/* tport_pending_t *p_left, *p_right, *p_parent; */
void *p_client;
tport_pending_error_f *p_callback;
msg_t *p_msg;
......@@ -3536,9 +3536,7 @@ void tport_send_queue(tport_t *self)
unsigned short qhead = self->tp_qhead, N = self->tp_params->tpp_qsize;
su_time_t now;
//assert(self->tp_iov && self->tp_iovlen > 0);
assert(self->tp_queue && self->tp_queue[qhead]);
//assert(self->tp_unsent && self->tp_unsentlen > 0);
self->tp_time = su_time_ms(now = su_now());
......
......@@ -107,7 +107,10 @@ void tls_set_default(tls_issues_t *i)
i->randFile = i->randFile ? i->randFile : "tls_seed.dat";
i->CAfile = i->CAfile ? i->CAfile : "cafile.pem";
i->cipher = i->cipher ? i->cipher : "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH";
//"RSA-WITH-AES-128-CBC-SHA";
/* Default SIP cipher */
/* "RSA-WITH-AES-128-CBC-SHA"; */
/* RFC-2543-compatibility ciphersuite */
/* TLS_RSA_WITH_3DES_EDE_CBC_SHA; */
}
static
......@@ -118,9 +121,11 @@ int tls_verify_cb(int ok, X509_STORE_CTX *store)
X509 *cert = X509_STORE_CTX_get_current_cert(store);
int depth = X509_STORE_CTX_get_error_depth(store);
int err = X509_STORE_CTX_get_error(store);
//X509_NAME_oneline(X509_get_subject_name(cert), data, 256);
//fprintf(stderr,"depth=%d %s\n",depth,data);
#if nomore
509_NAME_oneline(X509_get_subject_name(cert), data, 256);
fprintf(stderr,"depth=%d %s\n",depth,data);
#endif
if (!ok)
{
......@@ -132,7 +137,7 @@ int tls_verify_cb(int ok, X509_STORE_CTX *store)
fprintf(stderr, " err %i:%s\n", err, X509_verify_cert_error_string(err));
}
return 1; /* Always "ok" */
return 1; /* Always return "ok" */
}
static
......@@ -165,8 +170,9 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti)
if (tls->ctx == NULL) {
SSL_METHOD *meth;
// meth = SSLv3_method();
// meth = SSLv23_method();
/* meth = SSLv3_method(); */
/* meth = SSLv23_method(); */
if (ti->version)
meth = TLSv1_method();
......
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