mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-17 23:08:35 +00:00
fs_cli works on windows
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10937 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
e7c4953c99
commit
d4ae1a8f1c
3 files changed
+16
-3
No files matched your search
+3
-3
@@ -207,9 +207,9 @@ int main(int argc, char *argv[])
|
||||
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));
|
||||
|
||||
@@ -482,6 +482,16 @@ ESL_DECLARE(esl_status_t) esl_connect(esl_handle_t *handle, const char *host, es
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user