diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:43:59 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-02-10 15:43:59 -0800 |
commit | c27f813900a3c114562efbb8df1065e94766fc48 (patch) | |
tree | d95919283707dcab61009e27007374a745c9541e /telephony | |
parent | 0852ad57fa372f9b2854e4df685eaba8d8ef6790 (diff) | |
download | external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.zip external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.gz external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.bz2 |
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/android_modem.c | 7 | ||||
-rw-r--r-- | telephony/modem_driver.c | 5 | ||||
-rw-r--r-- | telephony/modem_driver.h | 2 | ||||
-rw-r--r-- | telephony/remote_call.c | 5 | ||||
-rw-r--r-- | telephony/sms.c | 2 | ||||
-rw-r--r-- | telephony/sysdeps_qemu.c | 16 |
6 files changed, 25 insertions, 12 deletions
diff --git a/telephony/android_modem.c b/telephony/android_modem.c index 2321c87..79e93b2 100644 --- a/telephony/android_modem.c +++ b/telephony/android_modem.c @@ -9,9 +9,11 @@ ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. */ -#include "android.h" +#include "android/android.h" #include "android_modem.h" -#include "android_timezone.h" +#include "android/utils/debug.h" +#include "android/utils/timezone.h" +#include "android/utils/system.h" #include "sim_card.h" #include "sysdeps.h" #include <memory.h> @@ -21,7 +23,6 @@ #include <stdio.h> #include "sms.h" #include "remote_call.h" -#include "vl.h" #define DEBUG 1 diff --git a/telephony/modem_driver.c b/telephony/modem_driver.c index 7de475f..99bbe6c 100644 --- a/telephony/modem_driver.c +++ b/telephony/modem_driver.c @@ -14,6 +14,7 @@ * on the emulated device. */ #include "modem_driver.h" +#include "qemu-char.h" #define xxDEBUG @@ -107,7 +108,7 @@ modem_driver_read( void* _md, const uint8_t* src, int len ) md->in_sms = 1; qemu_chr_write(md->cs, (const uint8_t*)answer, len); - qemu_chr_write(md->cs, "\r", 1); + qemu_chr_write(md->cs, (const uint8_t*)"\r", 1); } else D( "%s: -- NO ANSWER\n", __FUNCTION__ ); @@ -132,7 +133,7 @@ modem_driver_init( int base_port, ModemDriver* dm, CharDriverState* cs ) dm->in_sms = 0; dm->modem = amodem_create( base_port, modem_driver_unsol, dm ); - qemu_chr_add_read_handler( cs, modem_driver_can_read, modem_driver_read, dm ); + qemu_chr_add_handlers( cs, modem_driver_can_read, modem_driver_read, NULL, dm ); } diff --git a/telephony/modem_driver.h b/telephony/modem_driver.h index 9acf23f..d03010f 100644 --- a/telephony/modem_driver.h +++ b/telephony/modem_driver.h @@ -13,7 +13,7 @@ #define _modem_driver_h #include "android_modem.h" -#include "vl.h" +#include "qemu-common.h" /** in telephony/modem_driver.c */ /* this is the internal character driver used to communicate with the diff --git a/telephony/remote_call.c b/telephony/remote_call.c index 2bd5fa8..927e11d 100644 --- a/telephony/remote_call.c +++ b/telephony/remote_call.c @@ -10,10 +10,11 @@ ** GNU General Public License for more details. */ #include "remote_call.h" -#include "android_utils.h" +#include "android/utils/bufprint.h" +#include "android/utils/debug.h" #include "sysdeps.h" #include "gsm.h" -#include "android.h" +#include "android/android.h" #include "sockets.h" #include <stdlib.h> diff --git a/telephony/sms.c b/telephony/sms.c index 7a394d4..448eab4 100644 --- a/telephony/sms.c +++ b/telephony/sms.c @@ -18,7 +18,7 @@ #define DEBUG 1 #if 1 -# include "android_debug.h" +# include "android/utils/debug.h" # define D_ACTIVE VERBOSE_CHECK(modem) #else # define D_ACTIVE DEBUG diff --git a/telephony/sysdeps_qemu.c b/telephony/sysdeps_qemu.c index 39d966e..ec0b3f5 100644 --- a/telephony/sysdeps_qemu.c +++ b/telephony/sysdeps_qemu.c @@ -11,7 +11,17 @@ */ #include "sockets.h" #include "sysdeps.h" -#include "vl.h" +#include "qemu-timer.h" +#ifdef _WIN32 +#include <winsock2.h> +#else +#include <sys/socket.h> +#include <sys/select.h> +#include <sys/types.h> +#include <netinet/in.h> +#include <netinet/tcp.h> +#include <netdb.h> +#endif #define DEBUG 1 @@ -337,7 +347,7 @@ sys_channel_create_tcp_handler( SysChannel server_channel ) } /* disable Nagle algorithm */ - socket_set_lowlatency( channel->fd ); + socket_set_nodelay( channel->fd ); D( "%s: handler %p:%d created from server %p:%d\n", __FUNCTION__, server_channel, server_channel->fd, channel, channel->fd ); @@ -359,7 +369,7 @@ sys_channel_create_tcp_client( const char* hostname, int port ) /* set to non-blocking and disable Nagle algorithm */ socket_set_nonblock( channel->fd ); - socket_set_lowlatency( channel->fd ); + socket_set_nodelay( channel->fd ); return channel; } |