[Freeswitch-branches] [commit] r11118 - freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax
FreeSWITCH SVN
gmaruzz at freeswitch.org
Sun Jan 11 01:08:36 PST 2009
Author: gmaruzz
Date: Sun Jan 11 03:08:36 2009
New Revision: 11118
Log:
skypiax: cosmetics
Modified:
freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c
freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h
freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c
Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c (original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c Sun Jan 11 03:08:36 2009
@@ -906,7 +906,7 @@
skypiax_skypeaudio_init(&globals.SKYPIAX_INTERFACES[interface_id]);
- while (globals.SKYPIAX_INTERFACES[interface_id].AsteriskHandlesAst.
+ while (globals.SKYPIAX_INTERFACES[interface_id].SkypiaxHandles.
api_connected == 0) {
switch_sleep(1000);
}
@@ -978,30 +978,30 @@
if (globals.SKYPIAX_INTERFACES[interface_id].skypiax_do_controldev_thread_thread) {
#ifdef WIN32
- switch_file_write(p->AsteriskHandlesAst.fdesc[1], "sciutati", &howmany); // let's the controldev_thread die
+ switch_file_write(p->SkypiaxHandles.fdesc[1], "sciutati", &howmany); // let's the controldev_thread die
#else /* WIN32 */
- howmany = write(p->AsteriskHandlesAst.fdesc[1], "sciutati", howmany);
+ howmany = write(p->SkypiaxHandles.fdesc[1], "sciutati", howmany);
#endif /* WIN32 */
}
if (globals.SKYPIAX_INTERFACES[interface_id].skypiax_do_skype_thread_thread) {
#ifdef WIN32
- if (SendMessage(p->AsteriskHandlesAst.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) { // let's the do_skype_thread die
+ if (SendMessage(p->SkypiaxHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) { // let's the do_skype_thread die
ERRORA("WHY FALSE HERE? %d\n", SKYPIAX_P_LOG, GetLastError());
}
#else
XEvent e;
Atom atom1 =
- XInternAtom(p->AsteriskHandlesAst.disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
+ XInternAtom(p->SkypiaxHandles.disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
memset(&e, 0, sizeof(e));
e.xclient.type = ClientMessage;
e.xclient.message_type = atom1; /* leading message */
- e.xclient.display = p->AsteriskHandlesAst.disp;
- e.xclient.window = p->AsteriskHandlesAst.skype_win;
+ e.xclient.display = p->SkypiaxHandles.disp;
+ e.xclient.window = p->SkypiaxHandles.skype_win;
e.xclient.format = 8;
- XSendEvent(p->AsteriskHandlesAst.disp, p->AsteriskHandlesAst.win, False, 0, &e);
- XSync(p->AsteriskHandlesAst.disp, False);
+ XSendEvent(p->SkypiaxHandles.disp, p->SkypiaxHandles.win, False, 0, &e);
+ XSync(p->SkypiaxHandles.disp, False);
#endif
}
while (x) {
Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h (original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h Sun Jan 11 03:08:36 2009
@@ -132,7 +132,7 @@
#define SKYPIAX_MAX_INTERFACES 64
#ifndef WIN32
-struct AsteriskHandles {
+struct SkypiaxHandles {
Window skype_win;
Display *disp;
Window win;
@@ -141,7 +141,7 @@
};
#else //WIN32
-struct AsteriskHandles {
+struct SkypiaxHandles {
HWND win32_hInit_MainWindowHandle;
HWND win32_hGlobal_SkypeAPIWindowHandle;
HINSTANCE win32_hInit_ProcessHandle;
@@ -171,7 +171,7 @@
int tcp_cli_port;
int tcp_srv_port;
#endif
- struct AsteriskHandles AsteriskHandlesAst;
+ struct SkypiaxHandles SkypiaxHandles;
int interface_state; /*!< \brief 'state' of the interface (channel) */
char language[80]; /*!< \brief default Asterisk dialplan language for this interface */
Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c (original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c Sun Jan 11 03:08:36 2009
@@ -567,11 +567,11 @@
break;
case WM_DESTROY:
NOTICA("got DESTROY\n", SKYPIAX_P_LOG);
- p->AsteriskHandlesAst.win32_hInit_MainWindowHandle = NULL;
+ p->SkypiaxHandles.win32_hInit_MainWindowHandle = NULL;
PostQuitMessage(0);
break;
case WM_COPYDATA:
- if (p->AsteriskHandlesAst.win32_hGlobal_SkypeAPIWindowHandle == (HWND) uiParam) {
+ if (p->SkypiaxHandles.win32_hGlobal_SkypeAPIWindowHandle == (HWND) uiParam) {
unsigned int howmany;
char msg_from_skype[2048];
@@ -582,21 +582,21 @@
sizeof(msg_from_skype) - 2);
howmany = strlen(msg_from_skype) + 1;
- switch_file_write(p->AsteriskHandlesAst.fdesc[1], msg_from_skype, &howmany);
+ switch_file_write(p->SkypiaxHandles.fdesc[1], msg_from_skype, &howmany);
//NOTICA("From Skype API: %s\n", SKYPIAX_P_LOG, (const char *) poCopyData->lpData);
lReturnCode = 1;
}
break;
default:
- if (p && p->AsteriskHandlesAst.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
- if (uiMessage == p->AsteriskHandlesAst.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
+ if (p && p->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
+ if (uiMessage == p->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
switch (ulParam) {
case SKYPECONTROLAPI_ATTACH_SUCCESS:
- if (!p->AsteriskHandlesAst.api_connected) {
+ if (!p->SkypiaxHandles.api_connected) {
NOTICA("\n\n\tConnected to Skype API!\n", SKYPIAX_P_LOG);
- p->AsteriskHandlesAst.win32_hGlobal_SkypeAPIWindowHandle = (HWND) uiParam;
- p->AsteriskHandlesAst.win32_hGlobal_SkypeAPIWindowHandle =
- p->AsteriskHandlesAst.win32_hGlobal_SkypeAPIWindowHandle;
+ p->SkypiaxHandles.win32_hGlobal_SkypeAPIWindowHandle = (HWND) uiParam;
+ p->SkypiaxHandles.win32_hGlobal_SkypeAPIWindowHandle =
+ p->SkypiaxHandles.win32_hGlobal_SkypeAPIWindowHandle;
}
break;
case SKYPECONTROLAPI_ATTACH_PENDING_AUTHORIZATION:
@@ -604,11 +604,11 @@
("\n\n\tIf I do not (almost) immediately connect to Skype API,\n\tplease give the Skype client authorization to be connected \n\tby Asterisk and to not ask you again.\n\n",
SKYPIAX_P_LOG);
switch_sleep(5000);
- if (!p->AsteriskHandlesAst.api_connected) {
+ if (!p->SkypiaxHandles.api_connected) {
SendMessage(HWND_BROADCAST,
- p->AsteriskHandlesAst.
+ p->SkypiaxHandles.
win32_uiGlobal_MsgID_SkypeControlAPIDiscover,
- (WPARAM) p->AsteriskHandlesAst.win32_hInit_MainWindowHandle, 0);
+ (WPARAM) p->SkypiaxHandles.win32_hInit_MainWindowHandle, 0);
}
break;
case SKYPECONTROLAPI_ATTACH_REFUSED:
@@ -620,11 +620,11 @@
case SKYPECONTROLAPI_ATTACH_API_AVAILABLE:
DEBUGA_SKYPE("Skype API available\n", SKYPIAX_P_LOG);
switch_sleep(5000);
- if (!p->AsteriskHandlesAst.api_connected) {
+ if (!p->SkypiaxHandles.api_connected) {
SendMessage(HWND_BROADCAST,
- p->AsteriskHandlesAst.
+ p->SkypiaxHandles.
win32_uiGlobal_MsgID_SkypeControlAPIDiscover,
- (WPARAM) p->AsteriskHandlesAst.win32_hInit_MainWindowHandle, 0);
+ (WPARAM) p->SkypiaxHandles.win32_hInit_MainWindowHandle, 0);
}
break;
default:
@@ -651,26 +651,26 @@
fReturnStatus = 0;
lUUIDResult = UuidCreate(&oUUID);
- p->AsteriskHandlesAst.win32_hInit_ProcessHandle =
+ p->SkypiaxHandles.win32_hInit_ProcessHandle =
(HINSTANCE) OpenProcess(PROCESS_DUP_HANDLE, FALSE, GetCurrentProcessId());
- if (p->AsteriskHandlesAst.win32_hInit_ProcessHandle != NULL
+ if (p->SkypiaxHandles.win32_hInit_ProcessHandle != NULL
&& (lUUIDResult == RPC_S_OK || lUUIDResult == RPC_S_UUID_LOCAL_ONLY)) {
if (UuidToString(&oUUID, &paucUUIDString) == RPC_S_OK) {
WNDCLASS oWindowClass;
- strcpy(p->AsteriskHandlesAst.win32_acInit_WindowClassName, "Skype-API-Skypiax-");
- strcat(p->AsteriskHandlesAst.win32_acInit_WindowClassName, (char *) paucUUIDString);
+ strcpy(p->SkypiaxHandles.win32_acInit_WindowClassName, "Skype-API-Skypiax-");
+ strcat(p->SkypiaxHandles.win32_acInit_WindowClassName, (char *) paucUUIDString);
oWindowClass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
oWindowClass.lpfnWndProc = (WNDPROC) & skypiax_skype_present;
oWindowClass.cbClsExtra = 0;
oWindowClass.cbWndExtra = 0;
- oWindowClass.hInstance = p->AsteriskHandlesAst.win32_hInit_ProcessHandle;
+ oWindowClass.hInstance = p->SkypiaxHandles.win32_hInit_ProcessHandle;
oWindowClass.hIcon = NULL;
oWindowClass.hCursor = NULL;
oWindowClass.hbrBackground = NULL;
oWindowClass.lpszMenuName = NULL;
- oWindowClass.lpszClassName = p->AsteriskHandlesAst.win32_acInit_WindowClassName;
+ oWindowClass.lpszClassName = p->SkypiaxHandles.win32_acInit_WindowClassName;
if (RegisterClass(&oWindowClass) != 0)
fReturnStatus = 1;
@@ -679,34 +679,34 @@
}
}
if (fReturnStatus == 0)
- CloseHandle(p->AsteriskHandlesAst.win32_hInit_ProcessHandle),
- p->AsteriskHandlesAst.win32_hInit_ProcessHandle = NULL;
+ CloseHandle(p->SkypiaxHandles.win32_hInit_ProcessHandle),
+ p->SkypiaxHandles.win32_hInit_ProcessHandle = NULL;
return (fReturnStatus);
}
void win32_DeInitialize_DestroyWindowClass(struct skypiax_interface *p)
{
- UnregisterClass(p->AsteriskHandlesAst.win32_acInit_WindowClassName,
- p->AsteriskHandlesAst.win32_hInit_ProcessHandle);
- CloseHandle(p->AsteriskHandlesAst.win32_hInit_ProcessHandle),
- p->AsteriskHandlesAst.win32_hInit_ProcessHandle = NULL;
+ UnregisterClass(p->SkypiaxHandles.win32_acInit_WindowClassName,
+ p->SkypiaxHandles.win32_hInit_ProcessHandle);
+ CloseHandle(p->SkypiaxHandles.win32_hInit_ProcessHandle),
+ p->SkypiaxHandles.win32_hInit_ProcessHandle = NULL;
}
int win32_Initialize_CreateMainWindow(struct skypiax_interface *p)
{
- p->AsteriskHandlesAst.win32_hInit_MainWindowHandle =
+ p->SkypiaxHandles.win32_hInit_MainWindowHandle =
CreateWindowEx(WS_EX_APPWINDOW | WS_EX_WINDOWEDGE,
- p->AsteriskHandlesAst.win32_acInit_WindowClassName, "",
+ p->SkypiaxHandles.win32_acInit_WindowClassName, "",
WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT,
- 128, 128, NULL, 0, p->AsteriskHandlesAst.win32_hInit_ProcessHandle, p);
- return (p->AsteriskHandlesAst.win32_hInit_MainWindowHandle != NULL ? 1 : 0);
+ 128, 128, NULL, 0, p->SkypiaxHandles.win32_hInit_ProcessHandle, p);
+ return (p->SkypiaxHandles.win32_hInit_MainWindowHandle != NULL ? 1 : 0);
}
void win32_DeInitialize_DestroyMainWindow(struct skypiax_interface *p)
{
- if (p->AsteriskHandlesAst.win32_hInit_MainWindowHandle != NULL)
- DestroyWindow(p->AsteriskHandlesAst.win32_hInit_MainWindowHandle),
- p->AsteriskHandlesAst.win32_hInit_MainWindowHandle = NULL;
+ if (p->SkypiaxHandles.win32_hInit_MainWindowHandle != NULL)
+ DestroyWindow(p->SkypiaxHandles.win32_hInit_MainWindowHandle),
+ p->SkypiaxHandles.win32_hInit_MainWindowHandle = NULL;
}
DWORD win32_dwThreadId;
@@ -725,25 +725,25 @@
struct skypiax_interface *p;
p = obj;
- switch_file_pipe_create(&p->AsteriskHandlesAst.fdesc[0],
- &p->AsteriskHandlesAst.fdesc[1], skypiax_module_pool);
- p->AsteriskHandlesAst.win32_uiGlobal_MsgID_SkypeControlAPIAttach =
+ switch_file_pipe_create(&p->SkypiaxHandles.fdesc[0],
+ &p->SkypiaxHandles.fdesc[1], skypiax_module_pool);
+ p->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach =
RegisterWindowMessage("SkypeControlAPIAttach");
- p->AsteriskHandlesAst.win32_uiGlobal_MsgID_SkypeControlAPIDiscover =
+ p->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIDiscover =
RegisterWindowMessage("SkypeControlAPIDiscover");
switch_sleep(2000000);
- if (p->AsteriskHandlesAst.win32_uiGlobal_MsgID_SkypeControlAPIAttach != 0
- && p->AsteriskHandlesAst.win32_uiGlobal_MsgID_SkypeControlAPIDiscover != 0) {
+ if (p->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach != 0
+ && p->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIDiscover != 0) {
if (win32_Initialize_CreateWindowClass(p)) {
if (win32_Initialize_CreateMainWindow(p)) {
if (SendMessage
(HWND_BROADCAST,
- p->AsteriskHandlesAst.win32_uiGlobal_MsgID_SkypeControlAPIDiscover,
- (WPARAM) p->AsteriskHandlesAst.win32_hInit_MainWindowHandle, 0) != 0) {
- p->AsteriskHandlesAst.win32_hInit_MainWindowHandle =
- p->AsteriskHandlesAst.win32_hInit_MainWindowHandle;
+ p->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIDiscover,
+ (WPARAM) p->SkypiaxHandles.win32_hInit_MainWindowHandle, 0) != 0) {
+ p->SkypiaxHandles.win32_hInit_MainWindowHandle =
+ p->SkypiaxHandles.win32_hInit_MainWindowHandle;
while (1) {
MSG oMessage;
if (!running)
@@ -766,7 +766,7 @@
}
#else /* NOT WIN32 */
-int skypiax_skype_send_message(struct AsteriskHandles *AsteriskHandlesAst,
+int skypiax_skype_send_message(struct SkypiaxHandles *SkypiaxHandles,
const char *message_P)
{
@@ -774,9 +774,9 @@
Display *disp;
Window handle_P;
- w_P = AsteriskHandlesAst->skype_win;
- disp = AsteriskHandlesAst->disp;
- handle_P = AsteriskHandlesAst->win;
+ w_P = SkypiaxHandles->skype_win;
+ disp = SkypiaxHandles->disp;
+ handle_P = SkypiaxHandles->win;
Atom atom1 = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
Atom atom2 = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE", False);
@@ -808,9 +808,9 @@
return 1;
}
-int skypiax_skype_present(struct AsteriskHandles *AsteriskHandlesAst)
+int skypiax_skype_present(struct SkypiaxHandles *SkypiaxHandles)
{
- Atom skype_inst = XInternAtom(AsteriskHandlesAst->disp, "_SKYPE_INSTANCE", True);
+ Atom skype_inst = XInternAtom(SkypiaxHandles->disp, "_SKYPE_INSTANCE", True);
Atom type_ret;
int format_ret;
@@ -822,22 +822,22 @@
//XLockDisplay(disp);
status =
- XGetWindowProperty(AsteriskHandlesAst->disp,
- DefaultRootWindow(AsteriskHandlesAst->disp), skype_inst, 0, 1,
+ XGetWindowProperty(SkypiaxHandles->disp,
+ DefaultRootWindow(SkypiaxHandles->disp), skype_inst, 0, 1,
False, XA_WINDOW, &type_ret, &format_ret, &nitems_ret,
&bytes_after_ret, &prop);
//XUnlockDisplay(disp);
/* sanity check */
if (status != Success || format_ret != 32 || nitems_ret != 1) {
- AsteriskHandlesAst->skype_win = (Window) - 1;
+ SkypiaxHandles->skype_win = (Window) - 1;
DEBUGA_SKYPE("Skype instance not found\n", SKYPIAX_P_LOG);
return 0;
}
- AsteriskHandlesAst->skype_win = *(const unsigned long *) prop & 0xffffffff;
+ SkypiaxHandles->skype_win = *(const unsigned long *) prop & 0xffffffff;
DEBUGA_SKYPE("Skype instance found with id #%d\n", SKYPIAX_P_LOG,
- (unsigned int) AsteriskHandlesAst->skype_win);
+ (unsigned int) SkypiaxHandles->skype_win);
return 1;
}
@@ -866,7 +866,7 @@
{
struct skypiax_interface *p;
- struct AsteriskHandles *AsteriskHandlesAst;
+ struct SkypiaxHandles *SkypiaxHandles;
char buf[512];
Display *disp = NULL;
Window root = -1;
@@ -875,11 +875,11 @@
p = obj;
DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
- if (pipe(p->AsteriskHandlesAst.fdesc)) {
- fcntl(p->AsteriskHandlesAst.fdesc[0], F_SETFL, O_NONBLOCK);
- fcntl(p->AsteriskHandlesAst.fdesc[1], F_SETFL, O_NONBLOCK);
+ if (pipe(p->SkypiaxHandles.fdesc)) {
+ fcntl(p->SkypiaxHandles.fdesc[0], F_SETFL, O_NONBLOCK);
+ fcntl(p->SkypiaxHandles.fdesc[1], F_SETFL, O_NONBLOCK);
}
- AsteriskHandlesAst = &p->AsteriskHandlesAst;
+ SkypiaxHandles = &p->SkypiaxHandles;
disp = XOpenDisplay(p->X11_display);
if (!disp) {
ERRORA("Cannot open X Display '%s', exiting skype thread\n", SKYPIAX_P_LOG,
@@ -895,9 +895,9 @@
//FIXME pthread_cleanup_push(skypiax_skype_clean_disp, &xfd);
- AsteriskHandlesAst->disp = disp;
+ SkypiaxHandles->disp = disp;
- if (skypiax_skype_present(AsteriskHandlesAst)) {
+ if (skypiax_skype_present(SkypiaxHandles)) {
root = DefaultRootWindow(disp);
win =
XCreateSimpleWindow(disp, root, 0, 0, 1, 1, 0,
@@ -905,11 +905,11 @@
DefaultScreen
(disp)));
- AsteriskHandlesAst->win = win;
+ SkypiaxHandles->win = win;
snprintf(buf, 512, "NAME skypiax");
- if (!skypiax_skype_send_message(AsteriskHandlesAst, buf)) {
+ if (!skypiax_skype_send_message(SkypiaxHandles, buf)) {
ERRORA
("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch Skypiax again\n",
SKYPIAX_P_LOG);
@@ -918,7 +918,7 @@
}
snprintf(buf, 512, "PROTOCOL 6");
- if (!skypiax_skype_send_message(AsteriskHandlesAst, buf)) {
+ if (!skypiax_skype_send_message(SkypiaxHandles, buf)) {
ERRORA
("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch Skypiax again\n",
SKYPIAX_P_LOG);
@@ -957,7 +957,7 @@
howmany = strlen(b) + 1;
- howmany = write(AsteriskHandlesAst->fdesc[1], b, howmany);
+ howmany = write(SkypiaxHandles->fdesc[1], b, howmany);
memset(buffer, '\0', 17000);
}
@@ -984,7 +984,7 @@
static char acInputRow[1024];
COPYDATASTRUCT oCopyData;
#else /* WIN32 */
- struct AsteriskHandles *AsteriskHandlesAst;
+ struct SkypiaxHandles *SkypiaxHandles;
#endif /* WIN32 */
DEBUGA_SKYPE("SENDING: |||%s||||\n", SKYPIAX_P_LOG, msg_to_skype);
@@ -1003,8 +1003,8 @@
oCopyData.cbData = strlen(acInputRow) + 1;
if (oCopyData.cbData != 1) {
if (SendMessage
- (p->AsteriskHandlesAst.win32_hGlobal_SkypeAPIWindowHandle, WM_COPYDATA,
- (WPARAM) p->AsteriskHandlesAst.win32_hInit_MainWindowHandle,
+ (p->SkypiaxHandles.win32_hGlobal_SkypeAPIWindowHandle, WM_COPYDATA,
+ (WPARAM) p->SkypiaxHandles.win32_hInit_MainWindowHandle,
(LPARAM) & oCopyData) == FALSE) {
ERRORA
("Sending message failed - probably Skype crashed.\n\nPlease shutdown Skypiax (Asterisk), then restart Skype from the menu, then launch Skypiax and try again.\n",
@@ -1022,9 +1022,9 @@
if (option_debug > 100) {
DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
}
- AsteriskHandlesAst = &p->AsteriskHandlesAst;
+ SkypiaxHandles = &p->SkypiaxHandles;
- if (!skypiax_skype_send_message(AsteriskHandlesAst, msg_to_skype)) {
+ if (!skypiax_skype_send_message(SkypiaxHandles, msg_to_skype)) {
ERRORA
("Sending message failed - probably Skype crashed.\n\nPlease shutdown Skypiax (Asterisk), then restart Skype from the menu, then launch Skypiax and try again.\n",
SKYPIAX_P_LOG);
@@ -1074,7 +1074,7 @@
#ifdef WIN32
rt = 1;
#else /* WIN32 */
- fdselect = p->AsteriskHandlesAst.fdesc[0];
+ fdselect = p->SkypiaxHandles.fdesc[0];
FD_ZERO(&fs);
FD_SET(fdselect, &fs);
to.tv_usec = 2000000; //500 msec
@@ -1083,13 +1083,13 @@
#endif /* WIN32 */
if (rt > 0) {
- if (p->AsteriskHandlesAst.fdesc[0]) {
+ if (p->SkypiaxHandles.fdesc[0]) {
howmany = sizeof(read_from_pipe);
#ifdef WIN32
- switch_file_read(p->AsteriskHandlesAst.fdesc[0], read_from_pipe, &howmany);
+ switch_file_read(p->SkypiaxHandles.fdesc[0], read_from_pipe, &howmany);
#else /* WIN32 */
howmany =
- read(p->AsteriskHandlesAst.fdesc[0], read_from_pipe, sizeof(read_from_pipe));
+ read(p->SkypiaxHandles.fdesc[0], read_from_pipe, sizeof(read_from_pipe));
#endif /* WIN32 */
a = 0;
@@ -1184,7 +1184,7 @@
strncpy(id, where, sizeof(id) - 1);
if (!strcasecmp(id, p->skype_user)) {
- p->AsteriskHandlesAst.api_connected = 1;
+ p->SkypiaxHandles.api_connected = 1;
//DEBUGA_SKYPE ("Skype MSG: messaggio: %s, currentuserhandle: %s, cuh: %s, skype_user: %s!\n", SKYPIAX_P_LOG, messaggio, obj, id, p->skype_user);
}
}
More information about the Freeswitch-branches
mailing list