Exemple #1
0
void MpMapWidget::on_combo_server(){
	QUrl server_url( comboServer->itemData(comboServer->currentIndex()).toString() );
	server_url.addQueryItem("follow", mainObject->settings->value("callsign").toString() );
	webView->load( server_url );
	statusBar->showMessage(QString("Loading: ").append( server_url.toString()) );
}
Exemple #2
0
/**
 * @brief The NSSI injection-server.
 *
 * NSSI has already been initialized and the client already knows the URL of the
 * server.  This function simply registers the server methods and starts the
 * service loop.   The client will send a request to kill the service upon completion.
 *
 */
int injection_server_main(struct injection_args &args, MPI_Comm server_comm)
{
    int rc = NSSI_OK;

    nssi_service injection_svc;
    log_level debug_level;
    int server_rank;

    MPI_Comm_rank(server_comm, &server_rank);

    /* options that can be overriden by the command-line */
    int verbose = 3;  /* default debug_level */
    std::string server_url(NSSI_URL_LEN, '\0');          /* NNTI-style url of the server */
    std::string logfile("");
    const char *log_str=NULL;


    memset(&injection_svc, 0, sizeof(nssi_service));


    /* initialize the nssi service */
    rc = nssi_service_init((nssi_rpc_transport)args.transport, NSSI_SHORT_REQUEST_SIZE, &injection_svc);
    if (rc != NSSI_OK) {
        log_error(injection_debug_level, "could not init injection_svc: %s",
                nssi_err_str(rc));
        return -1;
    }

    // register callbacks for the service methods
    NSSI_REGISTER_SERVER_STUB(INJECTION_EMPTY_REQUEST_OP, injection_empty_request_srvr, void, void);


    // Get the Server URL
    std::string url(NSSI_URL_LEN, '\0');
    nssi_get_url((nssi_rpc_transport)args.transport, &url[0], NSSI_URL_LEN);


    // Set the maxumum number of requests to handle (-1 == infinite)
    injection_svc.max_reqs = -1;
    //        injection_svc.progress_callback=(uint64_t)make_progress;
    //        injection_svc.progress_callback_timeout=100;

    log_debug(injection_debug_level, "Starting Server: url = %s", url.c_str());

    // Tell the NSSI server to output log data
    //rpc_debug_level = injection_debug_level;

    // start processing requests, the client will send a request to exit when done
    rc = nssi_service_start(&injection_svc);
    if (rc != NSSI_OK) {
        log_info(injection_debug_level, "exited injection_svc: %s",
                nssi_err_str(rc));
    }

    sleep(5);

    /* shutdown the injection_svc */
    log_debug(injection_debug_level, "shutting down service library");
    nssi_service_fini(&injection_svc);


    return rc;
}
Exemple #3
0
	std::string url_seed_alert::message() const
	{
		return torrent_alert::message() + " url seed ("
			+ server_url() + ") failed: " + convert_from_native(error.message());
	}