]> sjero.net Git - linphone/blobdiff - console/linphonec.c
Fix bug report
[linphone] / console / linphonec.c
index 7d5c0cdd2da291a94dcd816095d2e9202b045775..60c3c2af11c48256e6af0ccfaa290d702e683b05 100644 (file)
@@ -346,7 +346,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L
                        linphonec_out("Resuming call %i with %s.\n", id, from);
                break;
                case LinphoneCallStreamsRunning:
-                       linphonec_out("Media streams established with %s for call %i.\n", from,id);
+                       linphonec_out("Media streams established with %s for call %i (%s).\n", from,id,( linphone_call_params_video_enabled( linphone_call_get_current_params(call)) ? "video":"audio"));
                break;
                case LinphoneCallPausing:
                        linphonec_out("Pausing call %i with %s.\n", id, from);
@@ -895,22 +895,22 @@ linphonec_prompt_for_auth_final(LinphoneCore *lc)
 void
 print_usage (int exit_status)
 {
-       fprintf (stdout, "\n\
-usage: linphonec [-c file] [-s sipaddr] [-a] [-V] [-d level ] [-l logfile]\n\
-       linphonec -v\n\
-\n\
-  -b  file             specify path of readonly factory configuration file.\n\
-  -c  file             specify path of configuration file.\n\
-  -d  level            be verbose. 0 is no output. 6 is all output\n\
-  -l  logfile          specify the log file for your SIP phone\n\
-  -s  sipaddress       specify the sip call to do at startup\n\
-  -a                   enable auto answering for incoming calls\n\
-  -V                   enable video features globally (disabled by default)\n\
-  -C                   enable video capture only (disabled by default)\n\
-  -D                   enable video display only (disabled by default)\n\
-  -S                   show general state messages (disabled by default)\n\
-  --wid  windowid      force embedding of video window into provided windowid (disabled by default)\n\
-  -v or --version      display version and exits.\n");
+       fprintf (stdout, "\n"
+"usage: linphonec [-c file] [-s sipaddr] [-a] [-V] [-d level ] [-l logfile]\n"
+       "linphonec -v\n"
+"\n"
+"  -b  file             specify path of readonly factory configuration file.\n"
+"  -c  file             specify path of configuration file.\n"
+"  -d  level            be verbose. 0 is no output. 6 is all output\n"
+"  -l  logfile          specify the log file for your SIP phone\n"
+"  -s  sipaddress       specify the sip call to do at startup\n"
+"  -a                   enable auto answering for incoming calls\n"
+"  -V                   enable video features globally (disabled by default)\n"
+"  -C                   enable video capture only (disabled by default)\n"
+"  -D                   enable video display only (disabled by default)\n"
+"  -S                   show general state messages (disabled by default)\n"
+"  --wid  windowid      force embedding of video window into provided windowid (disabled by default)\n"
+"  -v or --version      display version and exits.\n");
 
        exit(exit_status);
 }
@@ -1400,6 +1400,7 @@ copy_file(const char *from, const char *to)
                snprintf(message, 255, "Can't open %s for writing: %s\n",
                        to, strerror(errno));
                fprintf(stderr, "%s", message);
+               fclose(in);
                return 0;
        }
 
@@ -1408,6 +1409,8 @@ copy_file(const char *from, const char *to)
        {
                if ( ! fwrite(buf, 1, n, out) )
                {
+                       fclose(in);
+                       fclose(out);
                        return 0;
                }
        }