pike.git / lib / 7.8 / modules / SSL.pmod / sslfile.pike

version» Context lines:

pike.git/lib/7.8/modules/SSL.pmod/sslfile.pike:216: Inside #if defined(DEBUG)
  #ifdef DEBUG      #if constant (Thread.thread_create)      #define THREAD_T Thread.Thread   #define THIS_THREAD() this_thread()         protected void thread_error (string msg, THREAD_T other_thread)   { - #if 0 && constant (_locate_references) -  werror ("%s\n%O got %d refs", msg, this, _refs (this)); -  _locate_references (this); - #endif +     error ("%s"    "%s\n"    "User callbacks: a=%O r=%O w=%O c=%O\n"    "Internal callbacks: r=%O w=%O c=%O\n"    "Backend: %O This thread: %O Other thread: %O\n"    "%s",    msg,    !stream ? "Got no stream" :    stream->is_open() ? "Stream is open" :    "Stream is closed",
pike.git/lib/7.8/modules/SSL.pmod/sslfile.pike:495: Inside #if defined(SSL3_DEBUG)
  #ifdef SSL3_DEBUG    if (stream->query_fd)    stream_descr = "fd:" + stream->query_fd();    else    stream_descr = replace (sprintf ("%O", stream), "%", "%%");   #endif    write_buffer = ({});    read_buffer = String.Buffer();    real_backend = stream->query_backend();    close_state = STREAM_OPEN; - #if 0 -  // Unnecessary to init stuff to zero. -  callback_id = 0; -  local_backend = 0; -  close_packet_send_state = CLOSE_PACKET_NOT_SCHEDULED; -  local_errno = cb_errno = 0; -  got_extra_read_call_out = 0; -  alert_cb_called = 0; - #endif +        stream->set_read_callback (0);    stream->set_write_callback (0);    stream->set_close_callback (0);    stream->set_id (1);       if(!ctx->random)    ctx->random = Crypto.Random.random_string;    conn = SSL.connection (!is_client, ctx, min_version, max_version);   
pike.git/lib/7.8/modules/SSL.pmod/sslfile.pike:738:    read_buffer = String.Buffer (sizeof (conn->left_over));    read_buffer->add (conn->left_over);    close_state = STREAM_OPEN;    }       int conn_closing = conn->closing;    destruct (conn); // Necessary to avoid garbage.       write_buffer = ({});    - #if 0 -  accept_callback = 0; -  read_callback = 0; -  write_callback = 0; -  close_callback = 0; - #endif -  +     if (got_extra_read_call_out > 0)    real_backend->remove_call_out (ssl_read_callback);    got_extra_read_call_out = 0;       Stdio.File stream = global::stream;    global::stream = 0;       stream->set_read_callback (0);    stream->set_write_callback (0);    stream->set_close_callback (0);
pike.git/lib/7.8/modules/SSL.pmod/sslfile.pike:1085:    // the event bits at once through the _enable_callbacks call at the end.       if (!zero_type(read))    read_callback = read;    if (!zero_type(write))    write_callback = write;       if (!zero_type(close))    close_callback = close;    - #if 0 -  if (!zero_type(read_oob)) -  read_oob_callback = read_oob; -  if (!zero_type (write_oob_cb)) -  write_oob_callback = write_oob; - #endif -  +     if (!zero_type(accept))    accept_callback = accept;       if (stream) update_internal_state();    } LEAVE;   }      //! @returns   //! Returns the currently set callbacks in the same order   //! as the arguments to @[set_callbacks].
pike.git/lib/7.8/modules/SSL.pmod/sslfile.pike:2024:    if (sizeof (write_buffer)) {    string output = write_buffer[0];    int written;   #ifdef SIMULATE_CLOSE_PACKET_WRITE_FAILURE    if (close_packet_send_state == CLOSE_PACKET_QUEUED_OR_DONE)    written = -1;    else   #endif    written = stream->write (output);    -  if (written < 0 - #if 0 - #ifdef __NT__ -  // You don't want to know.. (Bug observed in Pike 0.6.132.) -  && stream->errno() != 1 - #endif - #endif -  ) { +  if (written < 0) {   #ifdef SIMULATE_CLOSE_PACKET_WRITE_FAILURE    if (close_packet_send_state == CLOSE_PACKET_QUEUED_OR_DONE)    cb_errno = System.EPIPE;    else   #endif    cb_errno = stream->errno();    cleanup_on_error();    SSL3_DEBUG_MSG ("ssl_write_callback: Write failed: %s\n",    strerror (cb_errno));