Skip to content

Commit

Permalink
Replace bool for int
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaian committed Mar 4, 2015
1 parent 3f13262 commit cf81cfb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/capture_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,19 @@ tls_check_keyfile(const char *keyfile)
OpenSSL_add_all_algorithms();

if (access(capture_get_keyfile(), R_OK) != 0)
return false;
return 0;

if (!(ssl_ctx = SSL_CTX_new(SSLv23_server_method())))
return false;
return 0;

SSL_CTX_use_PrivateKey_file(ssl_ctx, capture_get_keyfile(), SSL_FILETYPE_PEM);
if (!(ssl = SSL_new(ssl_ctx)))
return false;
return 0;

if (!SSL_get_privatekey(ssl))
return false;
return 0;

return true;
return 1;
}

int
Expand Down
2 changes: 1 addition & 1 deletion src/capture_tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ tls_connection_destroy(struct SSLConnection *conn);
* This can be used to check if a file contains valid RSA data
*
* @param keyfile Absolute path the keyfile
* @return true if file contains RSA private info, false otherwise
* @return 1 if file contains RSA private info, 0 otherwise
*/
int
tls_check_keyfile(const char *keyfile);
Expand Down
2 changes: 1 addition & 1 deletion src/ui_call_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ call_flow_draw(PANEL *panel)

// Draw the scrollbar
draw_vscrollbar(info->flow_win, call_group_msg_number(info->group, info->first_msg) * 2,
call_group_msg_count(info->group) * 2, true);
call_group_msg_count(info->group) * 2, 1);

// Redraw flow win
wnoutrefresh(info->flow_win);
Expand Down
10 changes: 5 additions & 5 deletions src/ui_call_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ call_list_create()
info->form = new_form(info->fields);
set_form_sub(info->form, win);
// Form starts inactive
call_list_form_activate(panel, false);
call_list_form_activate(panel, 0);

// Calculate available printable area
info->list_win = subwin(win, height - 5, width, 4, 0);
Expand All @@ -122,7 +122,7 @@ call_list_create()
// Set defualt filter text if configured
if (get_option_value("cl.filter")) {
set_field_buffer(info->fields[FLD_LIST_FILTER], 0, get_option_value("cl.filter"));
call_list_form_activate(panel, false);
call_list_form_activate(panel, 0);
}

// Return the created panel
Expand Down Expand Up @@ -294,7 +294,7 @@ call_list_draw(PANEL *panel)
}

// Draw scrollbar to the right
draw_vscrollbar(win, info->first_line, dispcallcnt, true);
draw_vscrollbar(win, info->first_line, dispcallcnt, 1);
wnoutrefresh(info->list_win);

return 0;
Expand Down Expand Up @@ -408,7 +408,7 @@ call_list_handle_key(PANEL *panel, int key)
case 9 /*KEY_TAB*/:
case KEY_F(3):
// Activate Form
call_list_form_activate(panel, true);
call_list_form_activate(panel, 1);
break;
case KEY_DOWN:
// Check if there is a call below us
Expand Down Expand Up @@ -578,7 +578,7 @@ call_list_handle_form_key(PANEL *panel, int key)
case KEY_DOWN:
case KEY_UP:
// Activate list
call_list_form_activate(panel, false);
call_list_form_activate(panel, 0);
break;
case KEY_RIGHT:
form_driver(info->form, REQ_RIGHT_CHAR);
Expand Down

0 comments on commit cf81cfb

Please sign in to comment.