Esempio n. 1
0
apr_status_t h2_stream_schedule(h2_stream *stream, int eos,
                                h2_stream_pri_cmp *cmp, void *ctx)
{
    apr_status_t status;
    AP_DEBUG_ASSERT(stream);
    
    if (stream->rst_error) {
        return APR_ECONNRESET;
    }
    /* Seeing the end-of-headers, we have everything we need to 
     * start processing it.
     */
    status = h2_mplx_process(stream->session->mplx, stream->id, 
                             stream->request, eos, cmp, ctx);
    if (eos) {
        set_closed(stream);
    }
    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, stream->session->c,
                  "h2_mplx(%ld-%d): start stream, task %s %s (%s)",
                  stream->session->id, stream->id,
                  stream->request->method, stream->request->path,
                  stream->request->authority);
    
    return status;
}
Esempio n. 2
0
void BSOCK::init()
{
   memset(this, 0, sizeof(BSOCK));
   set_closed();
   set_terminated();
   m_blocking = 1;
   msg = get_pool_memory(PM_BSOCK);
   errmsg = get_pool_memory(PM_MESSAGE);
   timeout = BSOCK_TIMEOUT;
}
Esempio n. 3
0
apr_status_t h2_stream_write_eos(h2_stream *stream)
{
    AP_DEBUG_ASSERT(stream);
    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, stream->m->c,
                  "h2_stream(%ld-%d): closing input",
                  stream->m->id, stream->id);
    if (set_closed(stream)) {
        return h2_request_close(stream->request);
    }
    return APR_SUCCESS;
}
Esempio n. 4
0
int break_door(string str) {
  if(str != "door" && str != "down door")
    return 0;
  if(query_door_status("pyrodoor8") == "broken") {
    return notify_fail("The door is already broken.\n");
  }
  write("You place a firm kick in the center of the door and snap it off of its hinges.");
  message("say", this_player()->query_cap_name()+" breaks the door off its hinges.",
          environment(this_player()), this_player());
  set_door_status("pyrodoor8", "broken");
  set_closed("pyrodoor8", 0);
  set_locked("pyrodoor8", 0);
  return 1;
}
Esempio n. 5
0
varargs void vault_close(status from_twin) {
    set_closed(True);
    if(!from_twin)
        query_twin()->vault_close(True);
}