summaryrefslogtreecommitdiff
path: root/common/ogl_ctx.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2011-04-03 15:49:36 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:30:23 +0100
commitc1403ee6bf4dfdd8f614f84ef145083b06a9f23e (patch)
treea0f72aa7e4ca235d3017760891bebc964dd530d8 /common/ogl_ctx.c
parentbb133148d85e66349b34375dd849d5d8c422da67 (diff)
Use a log handler to modify abort() behaviour
Be more library friendly, by not aborting in library errors. spice_common now includes a proper log handler that will abort by default when reaching a warning. SPICE_ABORT_LEVEL can be changed to modify run-time abort level. SPICE_DEBUG_LEVEL can be changed to be more verbose. By default, only log level more importants than WARNING. Only memory-related functions are allowed to abort(), since they are not recoverable errors in the library.
Diffstat (limited to 'common/ogl_ctx.c')
-rw-r--r--common/ogl_ctx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ogl_ctx.c b/common/ogl_ctx.c
index 41c0591..b4e60fb 100644
--- a/common/ogl_ctx.c
+++ b/common/ogl_ctx.c
@@ -243,7 +243,7 @@ void oglctx_destroy(OGLCtx *ctx)
XFreePixmap(ctx->x_display, ((OGLPixmapCtx *)ctx)->pixmap);
break;
default:
- PANIC("invalid ogl ctx type");
+ spice_error("invalid ogl ctx type");
}
XCloseDisplay(ctx->x_display);