diff options
Diffstat (limited to 'libgammu/device')
-rw-r--r-- | libgammu/device/bluetooth/blue_osx.c | 4 | ||||
-rw-r--r-- | libgammu/device/bluetooth/bluetooth.c | 4 | ||||
-rw-r--r-- | libgammu/device/bluetooth/bluetooth.h | 4 | ||||
-rw-r--r-- | libgammu/device/irda/irda.c | 4 | ||||
-rw-r--r-- | libgammu/device/proxy/proxy.c | 4 | ||||
-rw-r--r-- | libgammu/device/serial/ser_djg.c | 4 | ||||
-rw-r--r-- | libgammu/device/serial/ser_unx.c | 4 | ||||
-rw-r--r-- | libgammu/device/serial/ser_w32.c | 4 | ||||
-rw-r--r-- | libgammu/device/usb/usb.c | 4 |
9 files changed, 18 insertions, 18 deletions
diff --git a/libgammu/device/bluetooth/blue_osx.c b/libgammu/device/bluetooth/blue_osx.c index 5adf52c..a0e09f8 100644 --- a/libgammu/device/bluetooth/blue_osx.c +++ b/libgammu/device/bluetooth/blue_osx.c @@ -175,7 +175,7 @@ GSM_Error bluetooth_close(GSM_StateMachine *s) return ERR_NONE; } -int bluetooth_write(GSM_StateMachine *s, const void *buf, size_t nbytes) +ssize_t bluetooth_write(GSM_StateMachine *s, const void *buf, size_t nbytes) { GSM_Device_BlueToothData *d = &s->Device.Data.BlueTooth; threadContext *pContext = (threadContext *)d->Data; @@ -191,7 +191,7 @@ int bluetooth_write(GSM_StateMachine *s, const void *buf, size_t nbytes) return nbytes; } -int bluetooth_read(GSM_StateMachine *s, void *buffer, size_t size) +ssize_t bluetooth_read(GSM_StateMachine *s, void *buffer, size_t size) { GSM_Device_BlueToothData *d = &s->Device.Data.BlueTooth; threadContext *pContext = (threadContext *)d->Data; diff --git a/libgammu/device/bluetooth/bluetooth.c b/libgammu/device/bluetooth/bluetooth.c index 8cbb384..ba390f9 100644 --- a/libgammu/device/bluetooth/bluetooth.c +++ b/libgammu/device/bluetooth/bluetooth.c @@ -129,12 +129,12 @@ done: } #ifndef OSX_BLUE_FOUND -int bluetooth_read(GSM_StateMachine *s, void *buf, size_t nbytes) +ssize_t bluetooth_read(GSM_StateMachine *s, void *buf, size_t nbytes) { return socket_read(s, buf, nbytes, s->Device.Data.BlueTooth.hPhone); } -int bluetooth_write(GSM_StateMachine *s, const void *buf, size_t nbytes) +ssize_t bluetooth_write(GSM_StateMachine *s, const void *buf, size_t nbytes) { return socket_write(s, buf, nbytes, s->Device.Data.BlueTooth.hPhone); } diff --git a/libgammu/device/bluetooth/bluetooth.h b/libgammu/device/bluetooth/bluetooth.h index 13e8f03..aedeeb9 100644 --- a/libgammu/device/bluetooth/bluetooth.h +++ b/libgammu/device/bluetooth/bluetooth.h @@ -11,8 +11,8 @@ typedef struct { /* These are actually implemented in backend services */ GSM_Error bluetooth_connect(GSM_StateMachine *s, int port, char *device); GSM_Error bluetooth_findchannel(GSM_StateMachine *s); -int bluetooth_read(GSM_StateMachine *s, void *buf, size_t nbytes); -int bluetooth_write(GSM_StateMachine *s, const void *buf, size_t nbytes); +ssize_t bluetooth_read(GSM_StateMachine *s, void *buf, size_t nbytes); +ssize_t bluetooth_write(GSM_StateMachine *s, const void *buf, size_t nbytes); GSM_Error bluetooth_close(GSM_StateMachine *s); #endif diff --git a/libgammu/device/irda/irda.c b/libgammu/device/irda/irda.c index 0aa5077..aaad998 100644 --- a/libgammu/device/irda/irda.c +++ b/libgammu/device/irda/irda.c @@ -215,12 +215,12 @@ static GSM_Error irda_open (GSM_StateMachine *s) return ERR_NONE; } -static int irda_read(GSM_StateMachine *s, void *buf, size_t nbytes) +static ssize_t irda_read(GSM_StateMachine *s, void *buf, size_t nbytes) { return socket_read(s, buf, nbytes, s->Device.Data.Irda.hPhone); } -static int irda_write(GSM_StateMachine *s, const void *buf, size_t nbytes) +static ssize_t irda_write(GSM_StateMachine *s, const void *buf, size_t nbytes) { return socket_write(s, buf, nbytes, s->Device.Data.Irda.hPhone); } diff --git a/libgammu/device/proxy/proxy.c b/libgammu/device/proxy/proxy.c index db4a496..6dc91e6 100644 --- a/libgammu/device/proxy/proxy.c +++ b/libgammu/device/proxy/proxy.c @@ -132,7 +132,7 @@ GSM_Error proxy_open(GSM_StateMachine *s) return proxy_connect(s, &s->Device.Data.Proxy, s->CurrentConfig->Device); } -int proxy_read(GSM_StateMachine *s, void *buf, size_t nbytes) +ssize_t proxy_read(GSM_StateMachine *s, void *buf, size_t nbytes) { GSM_Device_ProxyData *d = &s->Device.Data.Proxy; struct timeval timeout2; @@ -172,7 +172,7 @@ ssize_t write_nosigpipe(int fd, const void *buf, size_t len) return result; } -int proxy_write(GSM_StateMachine *s, const void *buf, size_t nbytes) +ssize_t proxy_write(GSM_StateMachine *s, const void *buf, size_t nbytes) { GSM_Device_ProxyData *d = &s->Device.Data.Proxy; int ret; diff --git a/libgammu/device/serial/ser_djg.c b/libgammu/device/serial/ser_djg.c index 1ac69f4..da0f765 100644 --- a/libgammu/device/serial/ser_djg.c +++ b/libgammu/device/serial/ser_djg.c @@ -401,7 +401,7 @@ static GSM_Error serial_setspeed(GSM_StateMachine *s, int speed) return ERR_NONE; } -static int serial_read(GSM_StateMachine *s, char *buf, size_t nbytes) +static ssize_t serial_read(GSM_StateMachine *s, char *buf, size_t nbytes) { if(RecTail == RecHead) return 0; @@ -413,7 +413,7 @@ static int serial_read(GSM_StateMachine *s, char *buf, size_t nbytes) return 1; } -static int serial_write(GSM_StateMachine *s, char *buf, size_t nbytes) +static ssize_t serial_write(GSM_StateMachine *s, char *buf, size_t nbytes) { int i; diff --git a/libgammu/device/serial/ser_unx.c b/libgammu/device/serial/ser_unx.c index 845e5b1..c0fbd57 100644 --- a/libgammu/device/serial/ser_unx.c +++ b/libgammu/device/serial/ser_unx.c @@ -377,7 +377,7 @@ static GSM_Error serial_setspeed(GSM_StateMachine *s, int speed) return ERR_NONE; } -static int serial_read(GSM_StateMachine *s, void *buf, size_t nbytes) +static ssize_t serial_read(GSM_StateMachine *s, void *buf, size_t nbytes) { GSM_Device_SerialData *d = &s->Device.Data.Serial; struct timeval timeout2; @@ -399,7 +399,7 @@ static int serial_read(GSM_StateMachine *s, void *buf, size_t nbytes) return actual; } -static int serial_write(GSM_StateMachine *s, const void *buf, size_t nbytes) +static ssize_t serial_write(GSM_StateMachine *s, const void *buf, size_t nbytes) { GSM_Device_SerialData *d = &s->Device.Data.Serial; int ret; diff --git a/libgammu/device/serial/ser_w32.c b/libgammu/device/serial/ser_w32.c index e177815..af8608f 100644 --- a/libgammu/device/serial/ser_w32.c +++ b/libgammu/device/serial/ser_w32.c @@ -372,7 +372,7 @@ static GSM_Error serial_setspeed(GSM_StateMachine *s, int speed) return ERR_NONE; } -static int serial_read(GSM_StateMachine *s, void *buf, size_t nbytes) +static ssize_t serial_read(GSM_StateMachine *s, void *buf, size_t nbytes) { COMSTAT ComStat; DWORD ErrorFlags, Length, Error; @@ -428,7 +428,7 @@ end: return Length; } -static int serial_write(GSM_StateMachine *s, const void *buf, size_t nbytes) +static ssize_t serial_write(GSM_StateMachine *s, const void *buf, size_t nbytes) { DWORD BytesWritten,ErrorFlags,BytesSent=0; COMSTAT ComStat; diff --git a/libgammu/device/usb/usb.c b/libgammu/device/usb/usb.c index c58d3c9..aa839b5 100644 --- a/libgammu/device/usb/usb.c +++ b/libgammu/device/usb/usb.c @@ -465,7 +465,7 @@ GSM_Error GSM_USB_Terminate(GSM_StateMachine *s) return ERR_NONE; } -int GSM_USB_Read(GSM_StateMachine *s, void *buf, size_t nbytes) +ssize_t GSM_USB_Read(GSM_StateMachine *s, void *buf, size_t nbytes) { GSM_Device_USBData *d = &s->Device.Data.USB; int rc = LIBUSB_ERROR_TIMEOUT, ret = 0, repeat = 0; @@ -496,7 +496,7 @@ int GSM_USB_Read(GSM_StateMachine *s, void *buf, size_t nbytes) return ret; } -int GSM_USB_Write(GSM_StateMachine *s, const void *buf, size_t nbytes) +ssize_t GSM_USB_Write(GSM_StateMachine *s, const void *buf, size_t nbytes) { GSM_Device_USBData *d = &s->Device.Data.USB; int rc = LIBUSB_ERROR_TIMEOUT, ret = 0, repeat = 0; |