1diff --git a/src/mod/endpoints/mod_gsmopen/Makefile b/src/mod/endpoints/mod_gsmopen/Makefile 2index 18943c8..5324c52 100644 3--- a/src/mod/endpoints/mod_gsmopen/Makefile 4+++ b/src/mod/endpoints/mod_gsmopen/Makefile 5@@ -1,5 +1,5 @@ 6 MODNAME=mod_gsmopen 7-LOCAL_CFLAGS += -I../../../../libs/spandsp/src -I../../../..//libs/tiff-4.0.2/libtiff -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\" 8+LOCAL_CFLAGS += -I/usr/local/include -I../../../../libs/spandsp/src -I../../../..//libs/tiff-4.0.2/libtiff -DGSMOPEN_C_VER=\"`git log -1 --format="%h" gsmopen_protocol.cpp`\" -DMODGSMOPEN_C_VER=\"`git log -1 --format="%h" mod_gsmopen.cpp`\" 9 LOCAL_LDFLAGS=-L../../../../libs/spandsp/src -lspandsp -lctb-0.16 -lgsmme 10 LOCAL_OBJS=gsmopen_protocol.o 11 include ../../../../build/modmake.rules 12diff --git a/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp b/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp 13index 5bdda08..73ef93d 100644 14--- a/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp 15+++ b/src/mod/endpoints/mod_gsmopen/gsmopen_protocol.cpp 16@@ -2356,7 +2356,7 @@ int ucs2_to_utf8(private_t *tech_pvt, char *ucs2_in, char *utf8_out, size_t outb 17 iconv_t iconv_format; 18 int iconv_res; 19 char *outbuf; 20- char *inbuf; 21+ //char *inbuf; 22 size_t inbytesleft; 23 int c; 24 char stringa[5]; 25@@ -2376,9 +2376,10 @@ int ucs2_to_utf8(private_t *tech_pvt, char *ucs2_in, char *utf8_out, size_t outb 26 } 27 28 outbuf = utf8_out; 29- inbuf = converted; 30+ const char *inbuf = converted; 31 32- iconv_format = iconv_open("UTF8", "UCS-2BE"); 33+ //iconv_format = iconv_open("UTF8", "UCS-2BE"); 34+ iconv_format = iconv_open("UTF-8", "UCS-2BE"); 35 //iconv_format = iconv_open("UTF8", "UCS2"); 36 if (iconv_format == (iconv_t) -1) { 37 ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno)); 38@@ -2417,12 +2418,12 @@ int utf8_to_iso_8859_1(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, c 39 iconv_t iconv_format; 40 int iconv_res; 41 char *outbuf; 42- char *inbuf; 43+ //char *inbuf; 44 45 outbuf = iso_8859_1_out; 46- inbuf = utf8_in; 47+ const char *inbuf = utf8_in; 48 49- iconv_format = iconv_open("ISO_8859-1", "UTF8"); 50+ iconv_format = iconv_open("ISO_8859-1", "UTF-8"); 51 if (iconv_format == (iconv_t) -1) { 52 ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno)); 53 return -1; 54@@ -2467,7 +2468,7 @@ int iso_8859_1_to_utf8(private_t *tech_pvt, char *iso_8859_1_in, char *utf8_out, 55 iconv_t iconv_format; 56 int iconv_res; 57 char *outbuf; 58- char *inbuf; 59+ //char *inbuf; 60 size_t inbytesleft; 61 //int c; 62 //char stringa[5]; 63@@ -2477,9 +2478,9 @@ int iso_8859_1_to_utf8(private_t *tech_pvt, char *iso_8859_1_in, char *utf8_out, 64 DEBUGA_GSMOPEN("iso_8859_1_in=%s\n", GSMOPEN_P_LOG, iso_8859_1_in); 65 66 outbuf = utf8_out; 67- inbuf = iso_8859_1_in; 68+ const char *inbuf = iso_8859_1_in; 69 70- iconv_format = iconv_open("UTF8", "ISO_8859-1"); 71+ iconv_format = iconv_open("UTF-8", "ISO_8859-1"); 72 if (iconv_format == (iconv_t) -1) { 73 ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno)); 74 return -1; 75@@ -2514,7 +2515,7 @@ int utf8_to_ucs2(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, char *u 76 iconv_t iconv_format; 77 int iconv_res; 78 char *outbuf; 79- char *inbuf; 80+ //char *inbuf; 81 char converted[16000]; 82 int i; 83 char stringa[16]; 84@@ -2523,9 +2524,9 @@ int utf8_to_ucs2(private_t *tech_pvt, char *utf8_in, size_t inbytesleft, char *u 85 memset(converted, '\0', sizeof(converted)); 86 87 outbuf = converted; 88- inbuf = utf8_in; 89+ const char *inbuf = utf8_in; 90 91- iconv_format = iconv_open("UCS-2BE", "UTF8"); 92+ iconv_format = iconv_open("UCS-2BE", "UTF-8"); 93 if (iconv_format == (iconv_t) -1) { 94 ERRORA("error: %s\n", GSMOPEN_P_LOG, strerror(errno)); 95 return -1; 96diff --git a/src/mod/endpoints/mod_gsmopen/libctb-0.16/include/ctb-0.16/linux/serport.h b/src/mod/endpoints/mod_gsmopen/libctb-0.16/include/ctb-0.16/linux/serport.h 97index d88528b..f8851cc 100644 98--- a/src/mod/endpoints/mod_gsmopen/libctb-0.16/include/ctb-0.16/linux/serport.h 99+++ b/src/mod/endpoints/mod_gsmopen/libctb-0.16/include/ctb-0.16/linux/serport.h 100@@ -10,7 +10,7 @@ 101 ///////////////////////////////////////////////////////////////////////////// 102 103 #include "ctb-0.16/serportx.h" 104-#include <linux/serial.h> 105+//#include <linux/serial.h> 106 #include <termios.h> 107 108 namespace ctb { 109@@ -40,7 +40,7 @@ namespace ctb { 110 need the errors during a active connection, we must save the actual 111 error numbers in this separate structurs. 112 */ 113- struct serial_icounter_struct save_info, last_info; 114+ //struct serial_icounter_struct save_info, last_info; 115 116 /*! 117 \brief adaptor member function, to convert the plattform independent 118diff --git a/src/mod/endpoints/mod_gsmopen/libctb-0.16/src/linux/serport.cpp b/src/mod/endpoints/mod_gsmopen/libctb-0.16/src/linux/serport.cpp 119index a369abc..d190567 100644 120--- a/src/mod/endpoints/mod_gsmopen/libctb-0.16/src/linux/serport.cpp 121+++ b/src/mod/endpoints/mod_gsmopen/libctb-0.16/src/linux/serport.cpp 122@@ -136,7 +136,7 @@ namespace ctb { 123 // 124 int SerialPort::Ioctl(int cmd, void* args) 125 { 126- int count = 0; 127+ /* int count = 0; 128 int err = 0; 129 struct serial_icounter_struct info; 130 SerialPort_EINFO einfo; 131@@ -184,7 +184,8 @@ namespace ctb { 132 return -1; 133 } 134 last_info = info; 135- return 0; 136+ return 0;*/ 137+ return -1; 138 }; 139 140 int SerialPort::IsOpen() 141@@ -292,9 +293,9 @@ namespace ctb { 142 // request the actual numbers of breaks, framing, overrun 143 // and parity errors (because Linux summing all of them during 144 // system lifetime, not only while serial port is open. 145- ioctl(fd,TIOCGICOUNT,&save_info); 146+ //ioctl(fd,TIOCGICOUNT,&save_info); 147 // it's also careless, but we assume, that there was no error 148- last_info = save_info; 149+ //last_info = save_info; 150 151 // in case of a non-standard rate, the termios struct have to set 152 // with the B38400 rate, see above! 153@@ -359,7 +360,7 @@ namespace ctb { 154 155 int SerialPort::SetBaudrateAny( int baudrate ) 156 { 157- struct serial_struct ser_info; 158+ /* struct serial_struct ser_info; 159 160 int result = ioctl( fd, TIOCGSERIAL, &ser_info ); 161 162@@ -369,7 +370,8 @@ namespace ctb { 163 164 result = ioctl( fd, TIOCSSERIAL, &ser_info ); 165 166- return result; 167+ return result;*/ 168+ return -1; 169 } 170 171 int SerialPort::SetBaudrateStandard( int baudrate ) 172