From 3cc821540ef240ec9b9e32281699fb7494472b9e Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 1 Apr 2010 14:13:20 +0200 Subject: [PATCH] fix compilation with --disable-video --- console/commands.c | 5 +++++ coreapi/callbacks.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/console/commands.c b/console/commands.c index 8232a26fd..a2f4a73ff 100644 --- a/console/commands.c +++ b/console/commands.c @@ -1056,7 +1056,11 @@ lpc_cmd_staticpic(LinphoneCore *lc, char *args) } if (strcmp(arg1, "set")==0 && arg2) { +#ifdef VIDEO_ENABLED return linphone_core_set_static_picture(lc, arg2); +#else + linphonec_out("Sorry, linphonec was compiled without video capabilities.\n"); +#endif } return 0; /* Syntax error */ @@ -1632,6 +1636,7 @@ static int lpc_cmd_speak(LinphoneCore *lc, char *args){ char *wavfile; int status; FILE *file; + if (!args) return 0; memset(voice,0,sizeof(voice)); sscanf(args,"%s63",voice); diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index edc8cfa5e..54615315e 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -378,8 +378,8 @@ static void register_failure(SalOp *op, SalError error, SalReason reason, const } static void vfu_request(SalOp *op){ - LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op)); #ifdef VIDEO_ENABLED + LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op)); if (lc->videostream) video_stream_send_vfu(lc->videostream); #endif