summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-09-10 21:46:43 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-09-10 21:47:23 +0200
commitbd07501cded99bd4c6d7a763b94d695fc628806d (patch)
tree6af496dfaf343893753a85275abcba22f42a3022
parent8fa77415960bc6811715e6182bfc2fe4ef434f67 (diff)
use warning() instead of error()
-rw-r--r--modules/omx/module.c4
-rw-r--r--modules/omx/omx.c15
-rw-r--r--test/sip/sipsrv.c10
3 files changed, 15 insertions, 14 deletions
diff --git a/modules/omx/module.c b/modules/omx/module.c
index e9bd590..e1d136e 100644
--- a/modules/omx/module.c
+++ b/modules/omx/module.c
@@ -89,7 +89,7 @@ int omx_vidisp_display(struct vidisp_st *st, const char *title,
err = omx_display_enable(st->omx,
frame->size.w, frame->size.h, frame->size.w);
if (err) {
- error("omx_display_enable failed");
+ warning("omx_display_enable failed");
return err;
}
st->size = frame->size;
@@ -111,7 +111,7 @@ int omx_vidisp_display(struct vidisp_st *st, const char *title,
static int module_init(void)
{
if (omx_init(&omx) != 0) {
- error("Could not initialize OpenMAX");
+ warning("Could not initialize OpenMAX");
return ENODEV;
}
diff --git a/modules/omx/omx.c b/modules/omx/omx.c
index 8cd78cf..7cc4a45 100644
--- a/modules/omx/omx.c
+++ b/modules/omx/omx.c
@@ -128,7 +128,7 @@ int omx_init(struct omx_state* st)
#endif
if (!st->video_render || err != 0) {
- error("Failed to create OMX video_render component\n");
+ warning("Failed to create OMX video_render component\n");
return ENOENT;
}
else {
@@ -208,7 +208,7 @@ static void block_until_port_changed(OMX_HANDLETYPE hComponent,
r = OMX_GetParameter(hComponent,
OMX_IndexParamPortDefinition, &portdef);
if (r != OMX_ErrorNone) {
- error("block_until_port_changed: OMX_GetParameter "
+ warning("block_until_port_changed: OMX_GetParameter "
" failed with Result=%d\n", r);
}
if (portdef.bEnabled != bEnabled) {
@@ -252,7 +252,7 @@ int omx_display_enable(struct omx_state* st,
err |= OMX_GetParameter(st->video_render,
OMX_IndexParamPortDefinition, &portdef);
if (err != 0) {
- error("omx_display_enable: couldn't retrieve port def\n");
+ warning("omx_display_enable: couldn't retrieve port def\n");
err = ENOMEM;
goto exit;
}
@@ -273,7 +273,7 @@ int omx_display_enable(struct omx_state* st,
OMX_IndexParamPortDefinition, &portdef);
if (err) {
- error("omx_display_enable: could not set port definition\n");
+ warning("omx_display_enable: could not set port definition\n");
}
block_until_port_changed(st->video_render, VIDEO_RENDER_PORT, true);
@@ -281,7 +281,7 @@ int omx_display_enable(struct omx_state* st,
OMX_IndexParamPortDefinition, &portdef);
if (err != 0 || !portdef.bEnabled) {
- error("omx_display_enable: failed to set up video port\n");
+ warning("omx_display_enable: failed to set up video port\n");
err = ENOMEM;
goto exit;
}
@@ -305,7 +305,8 @@ int omx_display_enable(struct omx_state* st,
&st->buffers[i], VIDEO_RENDER_PORT,
st, portdef.nBufferSize);
if (err) {
- error("OMX_AllocateBuffer failed: %d\n", err);
+ warning("OMX_AllocateBuffer failed: %d\n",
+ err);
err = ENOMEM;
goto exit;
}
@@ -341,7 +342,7 @@ int omx_display_flush_buffer(struct omx_state* st)
{
if (OMX_EmptyThisBuffer(st->video_render, st->buffers[0])
!= OMX_ErrorNone) {
- error("OMX_EmptyThisBuffer error");
+ warning("OMX_EmptyThisBuffer error");
}
return 0;
diff --git a/test/sip/sipsrv.c b/test/sip/sipsrv.c
index ce1d562..374ea3b 100644
--- a/test/sip/sipsrv.c
+++ b/test/sip/sipsrv.c
@@ -61,7 +61,7 @@ static bool handle_register(struct sip_server *srv, const struct sip_msg *msg)
}
sip_reply(sip, msg, 500, strerror(err));
- error("domain find error: %s\n", strerror(err));
+ warning("domain find error: %s\n", strerror(err));
return true;
}
@@ -98,7 +98,7 @@ static bool handle_register(struct sip_server *srv, const struct sip_msg *msg)
default:
sip_reply(sip, msg, 500, strerror(err));
- error("domain error: %s\n", strerror(err));
+ warning("domain error: %s\n", strerror(err));
return true;
}
@@ -107,14 +107,14 @@ static bool handle_register(struct sip_server *srv, const struct sip_msg *msg)
if (err) {
if (err != ENOENT) {
sip_reply(sip, msg, 500, strerror(err));
- error("aor find error: %s\n", strerror(err));
+ warning("aor find error: %s\n", strerror(err));
return true;
}
err = aor_create(srv, &aor, &msg->to.uri);
if (err) {
sip_reply(sip, msg, 500, strerror(err));
- error("aor create error: %s\n", strerror(err));
+ warning("aor create error: %s\n", strerror(err));
return true;
}
}
@@ -159,7 +159,7 @@ static bool handle_register(struct sip_server *srv, const struct sip_msg *msg)
if (err) {
sip_reply(sip, msg, 500, strerror(err));
if (err != EPROTO)
- error("location update error: %s\n",
+ warning("location update error: %s\n",
strerror(err));
goto fail;
}