Drop __FUNCTION__ from clixon_debug() calls
This commit is contained in:
parent
d5a8d6b6e1
commit
cf2e27b43d
74 changed files with 619 additions and 578 deletions
|
|
@ -120,7 +120,7 @@ clixon_nghttp2_log_cb(void *handle,
|
|||
int suberr,
|
||||
cbuf *cb)
|
||||
{
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
cprintf(cb, "Fatal error: %s", nghttp2_strerror(suberr));
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -178,20 +178,20 @@ session_send_callback(nghttp2_session *session,
|
|||
int s;
|
||||
int sslerr;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s buflen:%zu", __FUNCTION__, buflen);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "buflen:%zu", buflen);
|
||||
s = rc->rc_s;
|
||||
while (totlen < buflen){
|
||||
if (rc->rc_ssl){
|
||||
if ((len = SSL_write(rc->rc_ssl, buf+totlen, buflen-totlen)) <= 0){
|
||||
er = errno;
|
||||
sslerr = SSL_get_error(rc->rc_ssl, len);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s SSL_write: errno:%s(%d) sslerr:%d", __FUNCTION__,
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "SSL_write: errno:%s(%d) sslerr:%d",
|
||||
strerror(er),
|
||||
er,
|
||||
sslerr);
|
||||
switch (sslerr){
|
||||
case SSL_ERROR_WANT_WRITE: /* 3 */
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s write SSL_ERROR_WANT_WRITE", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "write SSL_ERROR_WANT_WRITE");
|
||||
usleep(1000);
|
||||
continue;
|
||||
break;
|
||||
|
|
@ -205,7 +205,7 @@ session_send_callback(nghttp2_session *session,
|
|||
* platforms, linux here, freebsd want_write, or possibly differnt
|
||||
* ssl lib versions?
|
||||
*/
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s write EAGAIN", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "write EAGAIN");
|
||||
usleep(1000);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ session_send_callback(nghttp2_session *session,
|
|||
else{
|
||||
if ((len = write(s, buf+totlen, buflen-totlen)) < 0){
|
||||
if (errno == EAGAIN){
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s write EAGAIN", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "write EAGAIN");
|
||||
usleep(10000);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -252,10 +252,10 @@ session_send_callback(nghttp2_session *session,
|
|||
retval = 0;
|
||||
done:
|
||||
if (retval < 0){
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s retval:%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "retval:%d", retval);
|
||||
return retval;
|
||||
}
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s retval:%zd", __FUNCTION__, totlen);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "retval:%zd", totlen);
|
||||
return retval == 0 ? totlen : retval;
|
||||
}
|
||||
|
||||
|
|
@ -269,7 +269,7 @@ recv_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -346,7 +346,7 @@ restconf_nghttp2_path(restconf_stream_data *sd)
|
|||
goto done;
|
||||
retval = 0;
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%d", retval);
|
||||
if (cvv)
|
||||
cvec_free(cvv);
|
||||
if (oneline)
|
||||
|
|
@ -390,8 +390,7 @@ restconf_sd_read(nghttp2_session *session,
|
|||
#endif
|
||||
assert(cbuf_len(cb) > sd->sd_body_offset);
|
||||
remain = cbuf_len(cb) - sd->sd_body_offset;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s length:%zu totlen:%zu, offset:%zu remain:%zu",
|
||||
__FUNCTION__,
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "length:%zu totlen:%zu, offset:%zu remain:%zu",
|
||||
length,
|
||||
cbuf_len(cb),
|
||||
sd->sd_body_offset,
|
||||
|
|
@ -406,7 +405,7 @@ restconf_sd_read(nghttp2_session *session,
|
|||
}
|
||||
memcpy(buf, cbuf_get(cb) + sd->sd_body_offset, len);
|
||||
sd->sd_body_offset += len;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s retval:%zu", __FUNCTION__, len);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "retval:%zu", len);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
|
@ -434,7 +433,7 @@ restconf_submit_response(nghttp2_session *session,
|
|||
hdr = &hdrs[i++];
|
||||
hdr->name = (uint8_t*)":status";
|
||||
snprintf(valstr, 15, "%u", sd->sd_code);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s status %d", __FUNCTION__, sd->sd_code);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "status %d", sd->sd_code);
|
||||
hdr->value = (uint8_t*)valstr;
|
||||
hdr->namelen = strlen(":status");
|
||||
hdr->valuelen = strlen(valstr);
|
||||
|
|
@ -444,7 +443,7 @@ restconf_submit_response(nghttp2_session *session,
|
|||
while ((cv = cvec_each(sd->sd_outp_hdrs, cv)) != NULL){
|
||||
hdr = &hdrs[i++];
|
||||
hdr->name = (uint8_t*)cv_name_get(cv);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s hdr: %s", __FUNCTION__, hdr->name);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "hdr: %s", hdr->name);
|
||||
hdr->value = (uint8_t*)cv_string_get(cv);
|
||||
hdr->namelen = strlen(cv_name_get(cv));
|
||||
hdr->valuelen = strlen(cv_string_get(cv));
|
||||
|
|
@ -459,7 +458,7 @@ restconf_submit_response(nghttp2_session *session,
|
|||
}
|
||||
retval = 0;
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s retval:%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "retval:%d", retval);
|
||||
if (hdrs)
|
||||
free(hdrs);
|
||||
return retval;
|
||||
|
|
@ -475,7 +474,7 @@ http2_exec(restconf_conn *rc,
|
|||
{
|
||||
int retval = -1;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
if (sd->sd_path){
|
||||
free(sd->sd_path);
|
||||
sd->sd_path = NULL;
|
||||
|
|
@ -514,7 +513,7 @@ http2_exec(restconf_conn *rc,
|
|||
}
|
||||
retval = 0;
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s retval:%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "retval:%d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
@ -530,7 +529,7 @@ on_frame_recv_callback(nghttp2_session *session,
|
|||
restconf_stream_data *sd = NULL;
|
||||
char *query;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %s %d", __FUNCTION__,
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %d",
|
||||
clicon_int2str(nghttp2_frame_type_map, frame->hd.type),
|
||||
frame->hd.stream_id);
|
||||
switch (frame->hd.type) {
|
||||
|
|
@ -572,7 +571,7 @@ on_invalid_frame_recv_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -594,7 +593,7 @@ on_data_chunk_recv_callback(nghttp2_session *session,
|
|||
restconf_conn *rc = (restconf_conn *)user_data;
|
||||
restconf_stream_data *sd;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %d", __FUNCTION__, stream_id);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%d", stream_id);
|
||||
if ((sd = restconf_stream_find(rc, stream_id)) != NULL){
|
||||
cbuf_append_buf(sd->sd_indata, (void*)data, len);
|
||||
}
|
||||
|
|
@ -609,7 +608,7 @@ before_frame_send_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -621,7 +620,7 @@ on_frame_send_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -634,7 +633,7 @@ on_frame_not_send_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -648,7 +647,7 @@ on_stream_close_callback(nghttp2_session *session,
|
|||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %d %s", __FUNCTION__, error_code, nghttp2_strerror(error_code));
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%d %s", error_code, nghttp2_strerror(error_code));
|
||||
#if 0 // NOTNEEDED /* XXX think this is not necessary? */
|
||||
if (error_code){
|
||||
if (restconf_close_ssl_socket(rc, __FUNCTION__, 0) < 0)
|
||||
|
|
@ -668,7 +667,7 @@ on_begin_headers_callback(nghttp2_session *session,
|
|||
restconf_conn *rc = (restconf_conn *)user_data;
|
||||
restconf_stream_data *sd;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %s", __FUNCTION__, clicon_int2str(nghttp2_frame_type_map, frame->hd.type));
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", clicon_int2str(nghttp2_frame_type_map, frame->hd.type));
|
||||
if (frame->hd.type == NGHTTP2_HEADERS &&
|
||||
frame->headers.cat == NGHTTP2_HCAT_REQUEST) {
|
||||
sd = restconf_stream_data_new(rc, frame->hd.stream_id);
|
||||
|
|
@ -736,12 +735,12 @@ on_header_callback(nghttp2_session *session,
|
|||
switch (frame->hd.type){
|
||||
case NGHTTP2_HEADERS:
|
||||
assert (frame->headers.cat == NGHTTP2_HCAT_REQUEST);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s HEADERS %s %s", __FUNCTION__, name, value);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "HEADERS %s %s", name, value);
|
||||
if (nghttp2_hdr2clixon(rc->rc_h, (char*)name, (char*)value) < 0)
|
||||
goto done;
|
||||
break;
|
||||
default:
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %s %s", __FUNCTION__, clicon_int2str(nghttp2_frame_type_map, frame->hd.type), name);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %s", clicon_int2str(nghttp2_frame_type_map, frame->hd.type), name);
|
||||
break;
|
||||
}
|
||||
retval = 0;
|
||||
|
|
@ -759,7 +758,7 @@ select_padding_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return frame->hd.length;
|
||||
}
|
||||
|
||||
|
|
@ -775,7 +774,7 @@ data_source_read_length_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
#endif /* NOTUSED */
|
||||
|
|
@ -791,7 +790,7 @@ on_begin_frame_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %s", __FUNCTION__, clicon_int2str(nghttp2_frame_type_map, hd->type));
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", clicon_int2str(nghttp2_frame_type_map, hd->type));
|
||||
if (hd->type == NGHTTP2_CONTINUATION)
|
||||
assert(0);
|
||||
return 0;
|
||||
|
|
@ -811,7 +810,7 @@ send_data_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -825,7 +824,7 @@ pack_extension_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -838,7 +837,7 @@ unpack_extension_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
#endif /* NOTUSED */
|
||||
|
|
@ -853,7 +852,7 @@ on_extension_chunk_recv_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -866,7 +865,7 @@ error_callback(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -881,7 +880,7 @@ error_callback2(nghttp2_session *session,
|
|||
void *user_data)
|
||||
{
|
||||
// restconf_conn *rc = (restconf_conn *)user_data;
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
clixon_err(OE_NGHTTP2, lib_error_code, "%s", msg);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -904,7 +903,7 @@ http2_recv(restconf_conn *rc,
|
|||
int retval = -1;
|
||||
nghttp2_error ngerr;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
if (rc->rc_ngsession == NULL){
|
||||
/* http2_session_init not called */
|
||||
clixon_err(OE_RESTCONF, EINVAL, "No nghttp2 session");
|
||||
|
|
@ -941,7 +940,7 @@ http2_recv(restconf_conn *rc,
|
|||
}
|
||||
retval = 1; /* OK */
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s retval:%d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "retval:%d", retval);
|
||||
return retval;
|
||||
fail:
|
||||
retval = 0;
|
||||
|
|
@ -958,7 +957,7 @@ http2_send_server_connection(restconf_conn *rc)
|
|||
,{NGHTTP2_SETTINGS_ENABLE_PUSH, 0}};
|
||||
nghttp2_error ngerr;
|
||||
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s", __FUNCTION__);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "");
|
||||
if ((ngerr = nghttp2_submit_settings(rc->rc_ngsession,
|
||||
NGHTTP2_FLAG_NONE,
|
||||
iv,
|
||||
|
|
@ -972,7 +971,7 @@ http2_send_server_connection(restconf_conn *rc)
|
|||
}
|
||||
retval = 0;
|
||||
done:
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%s %d", __FUNCTION__, retval);
|
||||
clixon_debug(CLIXON_DBG_CLIENT, "%d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue