Commit cdd943a8 authored by smorlat's avatar smorlat

fix bug when spawning linphonec on windows

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@267 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 1660723e
......@@ -25,6 +25,8 @@
#ifdef WIN32
#include <windows.h>
#include <winbase.h>
#include <ws2tcpip.h>
#include <ctype.h>
#include <conio.h>
......@@ -195,11 +197,11 @@ static void spawn_linphonec(int argc, char *argv[]){
#else
static void spawn_linphonec(int argc, char *argv[]){
PPROCESS_INFORMATION pi;
PROCESS_INFORMATION pinfo;
STARTUPINFO si;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
ZeroMemory( &pinfo, sizeof(pinfo) );
BOOL ret=CreateProcess(NULL,"linphonec.exe --tcp " DEFAULT_TCP_PORT " -c NUL",
......@@ -210,9 +212,11 @@ static void spawn_linphonec(int argc, char *argv[]){
NULL,
NULL,
&si,
&pi);
&pinfo);
if (!ret){
fprintf(stderr,"Spawning of linphonec.exe failed.\n");
}else{
WaitForInputIdle(pinfo.hProcess,1000);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment