spice logging functions already use __FUNCTION__ so there is no need to duplicate this information. --- src/channel-base.c | 6 +++--- src/channel-cursor.c | 11 +++++------ src/channel-display.c | 34 +++++++++++++++++----------------- src/channel-inputs.c | 2 +- src/channel-main.c | 4 ++-- src/channel-playback.c | 12 ++++++------ src/channel-record.c | 2 +- src/decode-glz.c | 5 ++--- src/spice-channel.c | 18 +++++++++--------- src/spice-gstaudio.c | 4 ++-- src/spice-gtk-session.c | 2 +- src/spice-pulse.c | 34 +++++++++++++++++----------------- src/spice-session.c | 6 +++--- src/spice-util.c | 4 ++-- src/spice-widget.c | 28 ++++++++++++++-------------- 15 files changed, 85 insertions(+), 87 deletions(-) diff --git a/src/channel-base.c b/src/channel-base.c index 93609d4..29163dc 100644 --- a/src/channel-base.c +++ b/src/channel-base.c @@ -75,7 +75,7 @@ void spice_channel_handle_notify(SpiceChannel *channel, SpiceMsgIn *in) message_str = (char*)notify->message; } - CHANNEL_DEBUG(channel, "%s -- %s%s #%u%s%.*s", __FUNCTION__, + CHANNEL_DEBUG(channel, "%s%s #%u%s%.*s", severity, visibility, notify->what, message_str ? ": " : "", notify->message_len, message_str ? message_str : ""); @@ -87,7 +87,7 @@ void spice_channel_handle_disconnect(SpiceChannel *channel, SpiceMsgIn *in) { SpiceMsgDisconnect *disconnect = spice_msg_in_parsed(in); - CHANNEL_DEBUG(channel, "%s: ts: %" PRIu64", reason: %u", __FUNCTION__, + CHANNEL_DEBUG(channel, "ts: %" PRIu64", reason: %u", disconnect->time_stamp, disconnect->reason); } @@ -156,7 +156,7 @@ void spice_channel_handle_migrate(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgMigrate *mig = spice_msg_in_parsed(in); SpiceChannelPrivate *c = channel->priv; - CHANNEL_DEBUG(channel, "%s: flags %u", __FUNCTION__, mig->flags); + CHANNEL_DEBUG(channel, "flags %u", mig->flags); if (mig->flags & SPICE_MIGRATE_NEED_FLUSH) { /* if peer version > 1: pushing the mark msg before all other messgages and sending it, * and only it */ diff --git a/src/channel-cursor.c b/src/channel-cursor.c index 16ac7b4..a49fcf8 100644 --- a/src/channel-cursor.c +++ b/src/channel-cursor.c @@ -309,13 +309,13 @@ static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor) guint8 *rgba; guint8 val; - CHANNEL_DEBUG(channel, "%s: flags %d, size %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "flags %d, size %d", scursor->flags, scursor->data_size); if (scursor->flags & SPICE_CURSOR_FLAGS_NONE) return NULL; - CHANNEL_DEBUG(channel, "%s: type %s(%d), %" PRIx64 ", %dx%d", __FUNCTION__, + CHANNEL_DEBUG(channel, "type %s(%d), %" PRIx64 ", %dx%d", cursor_type_to_string(hdr->type), hdr->type, hdr->unique, hdr->width, hdr->height); @@ -379,8 +379,7 @@ static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor) break; default: - spice_warning("%s: unimplemented cursor type %d", __FUNCTION__, - hdr->type); + spice_warning("unimplemented cursor type %d", hdr->type); cursor->default_cursor = TRUE; goto cache_add; } @@ -436,7 +435,7 @@ static void cursor_handle_reset(SpiceChannel *channel, SpiceMsgIn *in) { SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv; - CHANNEL_DEBUG(channel, "%s, init_done: %d", __FUNCTION__, c->init_done); + CHANNEL_DEBUG(channel, "init_done: %d", c->init_done); cache_clear(c->cursors); g_coroutine_signal_emit(channel, signals[SPICE_CURSOR_RESET], 0); @@ -494,7 +493,7 @@ static void cursor_handle_trail(SpiceChannel *channel, SpiceMsgIn *in) g_return_if_fail(c->init_done == TRUE); - spice_warning("%s: TODO", __FUNCTION__); + spice_warning("TODO"); } /* coroutine context */ diff --git a/src/channel-display.c b/src/channel-display.c index 9dfa0a7..3eb7952 100644 --- a/src/channel-display.c +++ b/src/channel-display.c @@ -830,7 +830,7 @@ static void spice_display_channel_up(SpiceChannel *channel) "glz-window-size", &glz_window_size, "preferred-compression", &preferred_compression, NULL); - CHANNEL_DEBUG(channel, "%s: cache_size %d, glz_window_size %d (bytes)", __FUNCTION__, + CHANNEL_DEBUG(channel, "cache_size %d, glz_window_size %d (bytes)", cache_size, glz_window_size); init.pixmap_cache_id = 1; init.glz_dictionary_id = 1; @@ -885,7 +885,7 @@ static void display_handle_mark(SpiceChannel *channel, SpiceMsgIn *in) { SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv; - CHANNEL_DEBUG(channel, "%s", __FUNCTION__); + CHANNEL_DEBUG(channel, ""); g_return_if_fail(c->primary != NULL); #ifdef EXTRA_CHECKS g_warn_if_fail(c->mark == FALSE); @@ -901,7 +901,7 @@ static void display_handle_reset(SpiceChannel *channel, SpiceMsgIn *in) SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv; display_surface *surface = c->primary; - CHANNEL_DEBUG(channel, "%s: TODO detach_from_screen", __FUNCTION__); + CHANNEL_DEBUG(channel, "TODO detach_from_screen"); if (surface != NULL) surface->canvas->ops->clear(surface->canvas); @@ -1003,7 +1003,7 @@ static void display_handle_stream_create(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgDisplayStreamCreate *op = spice_msg_in_parsed(in); display_stream *st; - CHANNEL_DEBUG(channel, "%s: id %d", __FUNCTION__, op->id); + CHANNEL_DEBUG(channel, "id %d", op->id); if (op->id >= c->nstreams) { int n = c->nstreams; @@ -1047,7 +1047,7 @@ static gboolean display_stream_schedule(display_stream *st) SpiceStreamDataHeader *op; SpiceMsgIn *in; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (st->timeout || !session) return TRUE; @@ -1065,8 +1065,8 @@ static gboolean display_stream_schedule(display_stream *st) st->timeout = g_timeout_add(d, (GSourceFunc)display_stream_render, st); return TRUE; } else { - spice_debug("%s: rendering too late by %u ms (ts: %u, mmtime: %u), dropping ", - __FUNCTION__, time - op->multi_media_time, + spice_debug("rendering too late by %u ms (ts: %u, mmtime: %u), dropping ", + time - op->multi_media_time, op->multi_media_time, time); in = g_queue_pop_head(st->msgq); spice_msg_in_unref(in); @@ -1271,7 +1271,7 @@ static void display_update_stream_report(SpiceDisplayChannel *channel, uint32_t static void display_stream_reset_rendering_timer(display_stream *st) { - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (st->timeout != 0) { g_source_remove(st->timeout); st->timeout = 0; @@ -1320,7 +1320,7 @@ static void display_session_mm_time_reset_cb(SpiceSession *session, gpointer dat SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv; guint i; - CHANNEL_DEBUG(channel, "%s", __FUNCTION__); + CHANNEL_DEBUG(channel, ""); for (i = 0; i < c->nstreams; i++) { display_stream *st; @@ -1328,7 +1328,7 @@ static void display_session_mm_time_reset_cb(SpiceSession *session, gpointer dat if (c->streams[i] == NULL) { continue; } - spice_debug("%s: stream-id %d", __FUNCTION__, i); + spice_debug("stream-id %d", i); st = c->streams[i]; display_stream_reset_rendering_timer(st); } @@ -1342,7 +1342,7 @@ static void display_stream_test_frames_mm_time_reset(display_stream *st, SpiceStreamDataHeader *tail_op, *new_op; SpiceMsgIn *tail_msg; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); g_return_if_fail(new_frame_msg != NULL); tail_msg = g_queue_peek_tail(st->msgq); if (!tail_msg) { @@ -1477,9 +1477,9 @@ static void destroy_stream(SpiceChannel *channel, int id) return; num_out_frames = st->num_input_frames - st->num_drops_on_receive - st->num_drops_on_playback; - CHANNEL_DEBUG(channel, "%s: id=%d #in-frames=%d out/in=%.2f " + CHANNEL_DEBUG(channel, "id=%d #in-frames=%d out/in=%.2f " "#drops-on-receive=%d avg-late-time(ms)=%.2f " - "#drops-on-playback=%d", __FUNCTION__, + "#drops-on-playback=%d", id, st->num_input_frames, num_out_frames / (double)st->num_input_frames, @@ -1487,20 +1487,20 @@ static void destroy_stream(SpiceChannel *channel, int id) st->num_drops_on_receive ? st->arrive_late_time / ((double)st->num_drops_on_receive): 0, st->num_drops_on_playback); if (st->num_drops_seqs) { - CHANNEL_DEBUG(channel, "%s: #drops-sequences=%u ==>", __FUNCTION__, st->num_drops_seqs); + CHANNEL_DEBUG(channel, "#drops-sequences=%u ==>", st->num_drops_seqs); } for (i = 0; i < st->num_drops_seqs; i++) { drops_sequence_stats *stats = &g_array_index(st->drops_seqs_stats_arr, drops_sequence_stats, i); drops_duration_total += stats->duration; - CHANNEL_DEBUG(channel, "%s: \t len=%u start-ms=%u duration-ms=%u", __FUNCTION__, + CHANNEL_DEBUG(channel, "\t len=%u start-ms=%u duration-ms=%u", stats->len, stats->start_mm_time - st->first_frame_mm_time, stats->duration); } if (st->num_drops_seqs) { - CHANNEL_DEBUG(channel, "%s: drops-total-duration=%"G_GUINT64_FORMAT" ==>", __FUNCTION__, drops_duration_total); + CHANNEL_DEBUG(channel, "drops-total-duration=%"G_GUINT64_FORMAT" ==>", drops_duration_total); } g_array_free(st->drops_seqs_stats_arr, TRUE); @@ -1542,7 +1542,7 @@ static void display_handle_stream_destroy(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgDisplayStreamDestroy *op = spice_msg_in_parsed(in); g_return_if_fail(op != NULL); - CHANNEL_DEBUG(channel, "%s: id %d", __FUNCTION__, op->id); + CHANNEL_DEBUG(channel, "id %d", op->id); destroy_stream(channel, op->id); } diff --git a/src/channel-inputs.c b/src/channel-inputs.c index 7572bff..94d4d0f 100644 --- a/src/channel-inputs.c +++ b/src/channel-inputs.c @@ -181,7 +181,7 @@ static SpiceMsgOut* mouse_position(SpiceInputsChannel *channel) if (c->dpy == -1) return NULL; - /* CHANNEL_DEBUG(channel, "%s: +%d+%d", __FUNCTION__, c->x, c->y); */ + /* CHANNEL_DEBUG(channel, "+%d+%d", c->x, c->y); */ position.buttons_state = c->bs; position.x = c->x; position.y = c->y; diff --git a/src/channel-main.c b/src/channel-main.c index f7bdf3e..77a96a3 100644 --- a/src/channel-main.c +++ b/src/channel-main.c @@ -2059,7 +2059,7 @@ static void main_agent_handle_msg(SpiceChannel *channel, for (i = 0; i < size * 32; i++) { if (!VD_AGENT_HAS_CAPABILITY(caps->caps, size, i)) continue; - spice_debug("%s: cap: %d (%s)", __FUNCTION__, + spice_debug("cap: %d (%s)", i, NAME(agent_caps, i)); VD_AGENT_SET_CAPABILITY(c->agent_caps, i); } @@ -2129,7 +2129,7 @@ static void main_agent_handle_msg(SpiceChannel *channel, case VD_AGENT_REPLY: { VDAgentReply *reply = payload; - spice_debug("%s: reply: type %d, %s", __FUNCTION__, reply->type, + spice_debug("reply: type %d, %s", reply->type, reply->error == VD_AGENT_SUCCESS ? "success" : "error"); break; } diff --git a/src/channel-playback.c b/src/channel-playback.c index 7365ede..be79868 100644 --- a/src/channel-playback.c +++ b/src/channel-playback.c @@ -309,7 +309,7 @@ static void playback_handle_data(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgPlaybackPacket *packet = spice_msg_in_parsed(in); #ifdef DEBUG - CHANNEL_DEBUG(channel, "%s: time %d data %p size %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "time %d data %p size %d", packet->time, packet->data, packet->data_size); #endif @@ -346,7 +346,7 @@ static void playback_handle_mode(SpiceChannel *channel, SpiceMsgIn *in) SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv; SpiceMsgPlaybackMode *mode = spice_msg_in_parsed(in); - CHANNEL_DEBUG(channel, "%s: time %d mode %d data %p size %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "time %d mode %d data %p size %d", mode->time, mode->mode, mode->data, mode->data_size); c->mode = mode->mode; @@ -356,7 +356,7 @@ static void playback_handle_mode(SpiceChannel *channel, SpiceMsgIn *in) case SPICE_AUDIO_DATA_MODE_OPUS: break; default: - spice_warning("%s: unhandled mode", __FUNCTION__); + spice_warning("unhandled mode"); break; } } @@ -367,7 +367,7 @@ static void playback_handle_start(SpiceChannel *channel, SpiceMsgIn *in) SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv; SpiceMsgPlaybackStart *start = spice_msg_in_parsed(in); - CHANNEL_DEBUG(channel, "%s: fmt %d channels %d freq %d time %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "fmt %d channels %d freq %d time %d", start->format, start->channels, start->frequency, start->time); c->frame_count = 0; @@ -430,7 +430,7 @@ static void playback_handle_set_latency(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgPlaybackLatency *msg = spice_msg_in_parsed(in); c->min_latency = msg->latency_ms; - spice_debug("%s: notify latency update %u", __FUNCTION__, c->min_latency); + spice_debug("notify latency update %u", c->min_latency); g_coroutine_object_notify(G_OBJECT(channel), "min-latency"); } @@ -498,6 +498,6 @@ void spice_playback_channel_sync_latency(SpicePlaybackChannel *channel) { g_return_if_fail(SPICE_IS_PLAYBACK_CHANNEL(channel)); g_return_if_fail(channel->priv->is_active); - spice_debug("%s: notify latency update %u", __FUNCTION__, channel->priv->min_latency); + spice_debug("notify latency update %u", channel->priv->min_latency); g_coroutine_object_notify(G_OBJECT(SPICE_CHANNEL(channel)), "min-latency"); } diff --git a/src/channel-record.c b/src/channel-record.c index be72b97..1a17a0d 100644 --- a/src/channel-record.c +++ b/src/channel-record.c @@ -408,7 +408,7 @@ static void record_handle_start(SpiceChannel *channel, SpiceMsgIn *in) c->mode = spice_record_desired_mode(channel, start->frequency); - CHANNEL_DEBUG(channel, "%s: fmt %d channels %d freq %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "fmt %d channels %d freq %d", start->format, start->channels, start->frequency); g_return_if_fail(start->format == SPICE_AUDIO_FMT_S16); diff --git a/src/decode-glz.c b/src/decode-glz.c index 7fb51af..9696af9 100644 --- a/src/decode-glz.c +++ b/src/decode-glz.c @@ -92,7 +92,7 @@ static void glz_decoder_window_resize(SpiceGlzDecoderWindow *w) struct glz_image **new_images; int i, new_slot; - spice_debug("%s: array resize %d -> %d", __FUNCTION__, + spice_debug("array resize %d -> %d", w->nimages, w->nimages * 2); new_images = g_new0(struct glz_image*, w->nimages * 2); for (i = 0; i < w->nimages; i++) { @@ -368,8 +368,7 @@ static void decode_header(GlibGlzDecoder *d) d->image.id = decode_64(d); d->image.win_head_dist = decode_32(d); - spice_debug("%s: %dx%d, id %" PRId64 ", ref %" PRId64, - __FUNCTION__, + spice_debug("%dx%d, id %" PRId64 ", ref %" PRId64, d->image.width, d->image.height, d->image.id, d->image.id - d->image.win_head_dist); } diff --git a/src/spice-channel.c b/src/spice-channel.c index 8ad6395..06dafcb 100644 --- a/src/spice-channel.c +++ b/src/spice-channel.c @@ -134,7 +134,7 @@ static void spice_channel_constructed(GObject *gobject) snprintf(c->name, sizeof(c->name), "%s-%d:%d", desc, c->channel_type, c->channel_id); - CHANNEL_DEBUG(channel, "%s", __FUNCTION__); + CHANNEL_DEBUG(channel, ""); const char *disabled = g_getenv("SPICE_DISABLE_CHANNELS"); if (disabled && strstr(disabled, desc)) @@ -152,7 +152,7 @@ static void spice_channel_dispose(GObject *gobject) SpiceChannel *channel = SPICE_CHANNEL(gobject); SpiceChannelPrivate *c = channel->priv; - CHANNEL_DEBUG(channel, "%s %p", __FUNCTION__, gobject); + CHANNEL_DEBUG(channel, "%p", gobject); spice_channel_disconnect(channel, SPICE_CHANNEL_CLOSED); @@ -173,7 +173,7 @@ static void spice_channel_finalize(GObject *gobject) SpiceChannel *channel = SPICE_CHANNEL(gobject); SpiceChannelPrivate *c = channel->priv; - CHANNEL_DEBUG(channel, "%s %p", __FUNCTION__, gobject); + CHANNEL_DEBUG(channel, "%p", gobject); g_idle_remove_by_data(gobject); @@ -1755,8 +1755,8 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel) c->peer_hdr.size - c->peer_pos); c->peer_pos += rc; if (c->peer_pos != c->peer_hdr.size) { - spice_critical("%s: %s: incomplete link reply (%d/%d)", - c->name, __FUNCTION__, rc, c->peer_hdr.size); + spice_critical("%s: incomplete link reply (%d/%d)", + c->name, rc, c->peer_hdr.size); goto error; } switch (c->peer_msg->error) { @@ -1769,8 +1769,8 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel) c->tls = TRUE; return FALSE; default: - spice_warning("%s: %s: unhandled error %d", - c->name, __FUNCTION__, c->peer_msg->error); + spice_warning("%s: unhandled error %d", + c->name, c->peer_msg->error); goto error; } @@ -1778,7 +1778,7 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel) num_common_caps = GUINT32_FROM_LE(c->peer_msg->num_common_caps); num_caps = num_channel_caps + num_common_caps; - CHANNEL_DEBUG(channel, "%s: %d caps", __FUNCTION__, num_caps); + CHANNEL_DEBUG(channel, "%d caps", num_caps); /* see original spice/client code: */ /* g_return_if_fail(c->peer_msg + c->peer_msg->caps_offset * sizeof(uint32_t) > c->peer_msg + c->peer_hdr.size); */ @@ -2549,7 +2549,7 @@ static gboolean channel_connect(SpiceChannel *channel, gboolean tls) if (c->session == NULL || c->channel_type == -1 || c->channel_id == -1) { /* unset properties or unknown channel type */ - spice_warning("%s: channel setup incomplete", __FUNCTION__); + spice_warning("channel setup incomplete"); return false; } diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c index 0133e6f..c172692 100644 --- a/src/spice-gstaudio.c +++ b/src/spice-gstaudio.c @@ -89,7 +89,7 @@ static void spice_gstaudio_dispose(GObject *obj) { SpiceGstaudio *gstaudio = SPICE_GSTAUDIO(obj); SpiceGstaudioPrivate *p; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); p = gstaudio->priv; stream_dispose(&p->playback); @@ -147,7 +147,7 @@ static void record_stop(SpiceGstaudio *gstaudio) { SpiceGstaudioPrivate *p = gstaudio->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (p->record.pipe) gst_element_set_state(p->record.pipe, GST_STATE_READY); } diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c index 3f67c4f..516dba8 100644 --- a/src/spice-gtk-session.c +++ b/src/spice-gtk-session.c @@ -597,7 +597,7 @@ static void clipboard_get_targets(GtkClipboard *clipboard, selection = get_selection_from_clipboard(s, clipboard); g_return_if_fail(selection != -1); - spice_debug("%s:", __FUNCTION__); + spice_debug(NULL); if (spice_util_get_debug()) { for (a = 0; a < n_atoms; a++) { name = gdk_atom_name(atoms[a]); diff --git a/src/spice-pulse.c b/src/spice-pulse.c index 0a39cdc..b0f7b28 100644 --- a/src/spice-pulse.c +++ b/src/spice-pulse.c @@ -130,7 +130,7 @@ static void spice_pulse_dispose(GObject *obj) SpicePulse *pulse = SPICE_PULSE(obj); SpicePulsePrivate *p; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); p = pulse->priv; if (p->playback.uncork_op) @@ -251,7 +251,7 @@ static void pulse_cork_cb(pa_stream *pastream, int success, void *data) { struct stream *s = data; - spice_debug("%s: cork started", __FUNCTION__); + spice_debug(NULL); if (!success) spice_warning("pulseaudio cork operation failed"); @@ -366,10 +366,10 @@ static void stream_update_latency_callback(pa_stream *s, void *userdata) spice_playback_channel_set_delay(SPICE_PLAYBACK_CHANNEL(p->pchannel), usec / 1000); if (pa_stream_is_corked(p->playback.stream)) { if (p->last_delay >= p->target_delay) { - spice_debug("%s: uncork playback. delay %u target %u", __FUNCTION__, p->last_delay, p->target_delay); + spice_debug("uncork playback. delay %u target %u", p->last_delay, p->target_delay); stream_uncork(pulse, &p->playback); } else { - spice_debug("%s: still corked. delay %u target %u", __FUNCTION__, p->last_delay, p->target_delay); + spice_debug("still corked. delay %u target %u", p->last_delay, p->target_delay); } } } @@ -437,7 +437,7 @@ static void playback_start(SpicePlaybackChannel *channel, gint format, gint chan switch (state) { case PA_CONTEXT_READY: if (p->state != state) { - spice_debug("%s: pulse context ready", __FUNCTION__); + spice_debug("pulse context ready"); } if (p->playback.stream == NULL) { create_playback(pulse); @@ -446,8 +446,8 @@ static void playback_start(SpicePlaybackChannel *channel, gint format, gint chan break; default: if (p->state != state) { - spice_debug("%s: pulse context not ready (%s)", - __FUNCTION__, STATE_NAME(context_state_names, state)); + spice_debug("pulse context not ready (%s)", + STATE_NAME(context_state_names, state)); } break; } @@ -472,7 +472,7 @@ static void playback_data(SpicePlaybackChannel *channel, break; case PA_STREAM_READY: if (p->playback.state != state) { - spice_debug("%s: pulse playback stream ready", __FUNCTION__); + spice_debug("pulse playback stream ready"); } if (pa_stream_write(p->playback.stream, audio, size, NULL, 0, PA_SEEK_RELATIVE) < 0) { spice_warning("pa_stream_write() failed: %s", @@ -481,8 +481,8 @@ static void playback_data(SpicePlaybackChannel *channel, break; default: if (p->playback.state != state) { - spice_debug("%s: pulse playback stream not ready (%s)", - __FUNCTION__, STATE_NAME(stream_state_names, state)); + spice_debug("pulse playback stream not ready (%s)", + STATE_NAME(stream_state_names, state)); } break; } @@ -493,7 +493,7 @@ static void playback_stop(SpicePulse *pulse) { SpicePulsePrivate *p = pulse->priv; - spice_debug("%s: #underflow %u", __FUNCTION__, p->playback.num_underflow); + spice_debug("#underflow %u", p->playback.num_underflow); p->playback.started = FALSE; if (!p->playback.stream) @@ -589,7 +589,7 @@ static void record_start(SpiceRecordChannel *channel, gint format, gint channels switch (state) { case PA_CONTEXT_READY: if (p->state != state) { - spice_debug("%s: pulse context ready", __FUNCTION__); + spice_debug("pulse context ready"); } if (p->record.stream == NULL) { create_record(pulse); @@ -598,8 +598,8 @@ static void record_start(SpiceRecordChannel *channel, gint format, gint channels break; default: if (p->state != state) { - spice_warning("%s: pulse context not ready (%s)", - __FUNCTION__, STATE_NAME(context_state_names, state)); + spice_warning("pulse context not ready (%s)", + STATE_NAME(context_state_names, state)); } break; } @@ -610,7 +610,7 @@ static void record_stop(SpicePulse *pulse) { SpicePulsePrivate *p = pulse->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); p->record.started = FALSE; if (!p->record.stream) @@ -690,11 +690,11 @@ static void playback_min_latency_changed(GObject *object, GParamSpec *pspec, gpo p->target_delay = min_latency; if (p->last_delay < p->target_delay) { - spice_debug("%s: corking", __FUNCTION__); + spice_debug("corking"); if (p->playback.stream) stream_cork(pulse, &p->playback, FALSE); } else { - spice_debug("%s: not corking. The current delay satisfies the requirement", __FUNCTION__); + spice_debug("not corking. The current delay satisfies the requirement"); } } diff --git a/src/spice-session.c b/src/spice-session.c index 1c2c133..51d86aa 100644 --- a/src/spice-session.c +++ b/src/spice-session.c @@ -2340,7 +2340,7 @@ void spice_session_set_mm_time(SpiceSession *session, guint32 time) spice_debug("set mm time: %u", spice_session_get_mm_time(session)); if (time > old_time + MM_TIME_DIFF_RESET_THRESH || time < old_time) { - spice_debug("%s: mm-time-reset, old %u, new %u", __FUNCTION__, old_time, s->mm_time); + spice_debug("mm-time-reset, old %u, new %u", old_time, s->mm_time); g_coroutine_signal_emit(session, signals[SPICE_SESSION_MM_TIME_RESET], 0); } } @@ -2552,7 +2552,7 @@ void spice_session_sync_playback_latency(SpiceSession *session) spice_playback_channel_is_active(s->playback_channel)) { spice_playback_channel_sync_latency(s->playback_channel); } else { - spice_debug("%s: not implemented when there isn't audio playback", __FUNCTION__); + spice_debug("not implemented when there isn't audio playback"); } } @@ -2578,7 +2578,7 @@ guint32 spice_session_get_playback_latency(SpiceSession *session) spice_playback_channel_is_active(s->playback_channel)) { return spice_playback_channel_get_latency(s->playback_channel); } else { - spice_debug("%s: not implemented when there isn't audio playback", __FUNCTION__); + spice_debug("not implemented when there isn't audio playback"); return 0; } } diff --git a/src/spice-util.c b/src/spice-util.c index 2d0e7c9..d4b881d 100644 --- a/src/spice-util.c +++ b/src/spice-util.c @@ -268,8 +268,8 @@ const gchar* spice_yes_no(gboolean value) G_GNUC_INTERNAL guint16 spice_make_scancode(guint scancode, gboolean release) { - spice_debug("%s: %s scancode %d", - __FUNCTION__, release ? "release" : "", scancode); + spice_debug("%s scancode %d", + release ? "release" : "", scancode); if (release) { if (scancode < 0x100) diff --git a/src/spice-widget.c b/src/spice-widget.c index 83a4872..9c91ae7 100644 --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -481,7 +481,7 @@ static GdkCursor* get_blank_cursor(void) static gboolean grab_broken(SpiceDisplay *self, GdkEventGrabBroken *event, gpointer user_data G_GNUC_UNUSED) { - spice_debug("%s (implicit: %d, keyboard: %d)", __FUNCTION__, + spice_debug("(implicit: %d, keyboard: %d)", event->implicit, event->keyboard); if (event->keyboard) { @@ -516,7 +516,7 @@ static void drag_data_received_callback(SpiceDisplay *self, /* We get a buf like: * file:///root/a.txt\r\nfile:///root/b.txt\r\n */ - spice_debug("%s: drag a file", __FUNCTION__); + spice_debug("drag a file"); buf = gtk_selection_data_get_data(data); g_return_if_fail(buf != NULL); @@ -1270,7 +1270,7 @@ static void release_keys(SpiceDisplay *display) SpiceDisplayPrivate *d = display->priv; uint32_t i, b; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); for (i = 0; i < SPICE_N_ELEMENTS(d->key_state); i++) { if (!d->key_state[i]) { continue; @@ -1354,8 +1354,8 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key) } #endif - spice_debug("%s %s: keycode: %d state: %d group %d modifier %d", - __FUNCTION__, key->type == GDK_KEY_PRESS ? "press" : "release", + spice_debug("%s: keycode: %d state: %d group %d modifier %d", + key->type == GDK_KEY_PRESS ? "press" : "release", key->hardware_keycode, key->state, key->group, key->is_modifier); if (!d->seq_pressed && check_for_grab_key_pressed(display, key->type, key->keyval)) { @@ -1445,7 +1445,7 @@ void spice_display_send_keys(SpiceDisplay *display, const guint *keyvals, g_return_if_fail(SPICE_IS_DISPLAY(display)); g_return_if_fail(keyvals != NULL); - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (kind & SPICE_DISPLAY_KEY_EVENT_PRESS) { for (i = 0 ; i < nkeyvals ; i++) @@ -1463,7 +1463,7 @@ static gboolean enter_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); d->mouse_have_pointer = true; spice_gtk_session_set_mouse_has_pointer(d->gtk_session, true); @@ -1478,7 +1478,7 @@ static gboolean leave_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (d->mouse_grab_active) return true; @@ -1495,7 +1495,7 @@ static gboolean focus_in_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_UN SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); /* * Ignore focus in when we already have the focus @@ -1523,7 +1523,7 @@ static gboolean focus_out_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_U SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); update_display(NULL); /* @@ -1661,7 +1661,7 @@ static gboolean scroll_event(GtkWidget *widget, GdkEventScroll *scroll) SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (!d->inputs) return true; @@ -1690,7 +1690,7 @@ static gboolean button_event(GtkWidget *widget, GdkEventButton *button) SpiceDisplayPrivate *d = display->priv; int x, y; - spice_debug("%s %s: button %d, state 0x%x", __FUNCTION__, + spice_debug("%s: button %d, state 0x%x", button->type == GDK_BUTTON_PRESS ? "press" : "release", button->button, button->state); @@ -2411,11 +2411,11 @@ static void cursor_reset(SpiceCursorChannel *channel, gpointer data) GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(display)); if (!window) { - spice_debug("%s: no window, returning", __FUNCTION__); + spice_debug("no window, returning"); return; } - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); gdk_window_set_cursor(window, NULL); } -- 2.5.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel