Revision
14629
Author
gmaruzz
Date
2009-08-24 22:34:23 -0500 (Mon, 24 Aug 2009)

Log Message

skypiax: fixed problem with different storage between linux and windoz for tcp ports (int to unsigned short). Thanks Sergey for reporting

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax.h (14628 => 14629)


--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax.h	2009-08-24 23:24:17 UTC (rev 14628)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax.h	2009-08-25 03:34:23 UTC (rev 14629)
@@ -288,4 +288,8 @@
 int remote_party_is_early_media(private_t * tech_pvt);
 int skypiax_answer(private_t * tech_pvt, char *id, char *value);
 int skypiax_transfer(private_t * tech_pvt, char *id, char *value);
+#ifndef WIN32
 int skypiax_socket_create_and_bind(private_t * tech_pvt, int *which_port);
+#else
+int skypiax_socket_create_and_bind(private_t * tech_pvt, unsigned short *which_port);
+#endif //WIN32
\ No newline at end of file

Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c (14628 => 14629)


--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	2009-08-24 23:24:17 UTC (rev 14628)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	2009-08-25 03:34:23 UTC (rev 14629)
@@ -25,12 +25,19 @@
 int xerror = 0;
 #endif /* WIN32 */
 /*************************************/
-
+#ifndef WIN32
 int skypiax_socket_create_and_bind(private_t * tech_pvt, int *which_port)
+#else
+int skypiax_socket_create_and_bind(private_t * tech_pvt, unsigned short *which_port)
+#endif //WIN32
 {
 	int s = -1;
 	struct sockaddr_in my_addr;
+#ifndef WIN32
 	int start_port = 6001;
+#else
+unsigned short start_port = 6001;
+#endif //WIN32
 
 	memset(&my_addr, 0, sizeof(my_addr));
 	my_addr.sin_family = AF_INET;