[Freeswitch-svn] [commit] r10937 - in freeswitch/trunk: . libs/esl libs/esl/src
FreeSWITCH SVN
mikej at freeswitch.org
Tue Dec 23 15:26:38 PST 2008
Author: mikej
Date: Tue Dec 23 18:26:37 2008
New Revision: 10937
Log:
fs_cli works on windows
Modified:
freeswitch/trunk/Freeswitch.2008.sln
freeswitch/trunk/libs/esl/fs_cli.c
freeswitch/trunk/libs/esl/src/esl.c
Modified: freeswitch/trunk/Freeswitch.2008.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.2008.sln (original)
+++ freeswitch/trunk/Freeswitch.2008.sln Tue Dec 23 18:26:37 2008
@@ -1724,6 +1724,7 @@
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Debug|Win32.Build.0 = Debug|Any CPU
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Debug|x64.ActiveCfg = Debug|Any CPU
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|Win32.ActiveCfg = Release|Any CPU
+ {834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|Win32.Build.0 = Release|Any CPU
{834E2B2F-5483-4B80-8FE3-FE48FF76E5C0}.Release|x64.ActiveCfg = Release|Any CPU
{E796E337-DE78-4303-8614-9A590862EE95}.Debug|Win32.ActiveCfg = Debug|Win32
{E796E337-DE78-4303-8614-9A590862EE95}.Debug|Win32.Build.0 = Debug|Win32
@@ -1768,8 +1769,10 @@
{CF405366-9558-4AE8-90EF-5E21B51CCB4E}.Release|Win32.Build.0 = Release|Win32
{CF405366-9558-4AE8-90EF-5E21B51CCB4E}.Release|x64.ActiveCfg = Release|Win32
{D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Debug|Win32.Build.0 = Debug|Win32
{D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Debug|x64.ActiveCfg = Debug|Win32
{D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Release|Win32.ActiveCfg = Release|Win32
+ {D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Release|Win32.Build.0 = Release|Win32
{D2FB8043-D208-4AEE-8F18-3B5857C871B9}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
Modified: freeswitch/trunk/libs/esl/fs_cli.c
==============================================================================
--- freeswitch/trunk/libs/esl/fs_cli.c (original)
+++ freeswitch/trunk/libs/esl/fs_cli.c Tue Dec 23 18:26:37 2008
@@ -207,9 +207,9 @@
char cfile[512] = "/tmp/fs_cli_config";
char *home = getenv("HOME");
#else
- char hfile[512] = "c:\\fs_cli_history";
- char cfile[512] = "c:\\fs_cli_config";
- char *home = getenv("HOME");
+ char hfile[512] = ".\\fs_cli_history";
+ char cfile[512] = ".\\fs_cli_config";
+ char *home = ""; //getenv("HOME");
#endif
strncpy(profiles[0].host, "127.0.0.1", sizeof(profiles[0].host));
Modified: freeswitch/trunk/libs/esl/src/esl.c
==============================================================================
--- freeswitch/trunk/libs/esl/src/esl.c (original)
+++ freeswitch/trunk/libs/esl/src/esl.c Tue Dec 23 18:26:37 2008
@@ -482,6 +482,16 @@
char sendbuf[256];
int rval = 0;
const char *hval;
+#ifdef WIN32
+ WORD wVersionRequested = MAKEWORD(2, 0);
+ WSADATA wsaData;
+ int err = WSAStartup(wVersionRequested, &wsaData);
+ if (err != 0) {
+ snprintf(handle->err, sizeof(handle->err), "WSAStartup Error");
+ return ESL_FAIL;
+ }
+
+#endif
if (!handle->mutex) {
esl_mutex_create(&handle->mutex);
More information about the Freeswitch-svn
mailing list