From: Iain Hibbert <plu...@netbsd.org>

---
 apps/discovery.c |    2 +-
 apps/obexftp.c   |   16 ++++++++--------
 bfb/bfb.h        |    2 +-
 bfb/bfb_io.c     |    6 +++---
 bfb/bfb_io.h     |    4 ++--
 obexftp/client.c |    4 ++--
 obexftp/client.h |    4 ++--
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/apps/discovery.c b/apps/discovery.c
index 68f1b00..271d08a 100644
--- a/apps/discovery.c
+++ b/apps/discovery.c
@@ -193,7 +193,7 @@ static int do_at_cmd(fd_t fd, const char *cmd, char 
*rspbuf, int rspbuflen)
 static struct mobile_info *probe_tty(const char *ttyname)
 {
        int speed;
-       uint8_t rspbuf[200];
+       char rspbuf[200];
        struct mobile_info *info;
        char *p;
 #ifdef _WIN32
diff --git a/apps/obexftp.c b/apps/obexftp.c
index 4538c0f..8d66e00 100644
--- a/apps/obexftp.c
+++ b/apps/obexftp.c
@@ -131,13 +131,13 @@ static void info_cb(int event, const char *msg, int len, 
void *UNUSED(data))
 }
 
 /* create global uuid buffers */
-static const char *fbs_uuid = (const char *)UUID_FBS;
-static const char *irmc_uuid = (const char *)UUID_IRMC;
-static const char *s45_uuid = (const char *)UUID_S45;
-static const char *pcsoftware_uuid = (const char *)UUID_PCSOFTWARE;
+static const uint8_t *fbs_uuid = UUID_FBS;
+static const uint8_t *irmc_uuid = UUID_IRMC;
+static const uint8_t *s45_uuid = UUID_S45;
+static const uint8_t *pcsoftware_uuid = UUID_PCSOFTWARE;
 
 /* parse UUID string to real bytes */
-static int parse_uuid(char *name, const char **uuid, int *uuid_len)
+static int parse_uuid(char *name, const uint8_t **uuid, int *uuid_len)
 {
        if (name == NULL || *name == '\0' ||
                        !strncasecmp(name, "none", 4) ||
@@ -240,7 +240,7 @@ static int transport = OBEX_TRANS_IRDA;
 #endif /* HAVE_BLUETOOTH */
 /*@only@*/ /*@null@*/ static char *device = NULL;
 static int channel = -1;
-static const char *use_uuid = (const char *)UUID_FBS;
+static const uint8_t *use_uuid = UUID_FBS;
 static int use_uuid_len = sizeof(UUID_FBS);
 static int use_conn=1;
 static int use_path=1;
@@ -248,7 +248,7 @@ static int timeout = 20; /* default accept/reject timeout 
of 20 seconds */
 
 
 /* connect with given uuid. re-connect every time */
-static int cli_connect_uuid(const char *uuid, int uuid_len)
+static int cli_connect_uuid(const uint8_t *uuid, int uuid_len)
 {
        int ret, retry;
 #ifdef HAVE_SYS_TIMES_H
@@ -348,7 +348,7 @@ static void cli_disconnect()
        }
 }
 
-static void probe_device_uuid(const char *uuid, int uuid_len)
+static void probe_device_uuid(const uint8_t *uuid, int uuid_len)
 {
        int rsp[10];
        
diff --git a/bfb/bfb.h b/bfb/bfb.h
index 349a0ef..b13bb93 100644
--- a/bfb/bfb.h
+++ b/bfb/bfb.h
@@ -90,7 +90,7 @@ int   bfb_stuff_data(/*@out@*/ uint8_t *buffer, uint8_t type, 
uint8_t *data, uint1
 int    bfb_write_packets(fd_t fd, uint8_t type, uint8_t *buffer, int length);
 
 #define bfb_write_at(fd, data) \
-       bfb_write_packets(fd, BFB_FRAME_AT, data, strlen(data))
+       bfb_write_packets(fd, BFB_FRAME_AT, (uint8_t *)data, strlen(data))
 
 #define bfb_write_key(fd, data) \
        bfb_write_subcmd8(fd, BFB_FRAME_KEY, BFB_KEY_PRESS, data)
diff --git a/bfb/bfb_io.c b/bfb/bfb_io.c
index abe3ad8..61941a6 100644
--- a/bfb/bfb_io.c
+++ b/bfb/bfb_io.c
@@ -51,7 +51,7 @@
 #include <common.h>
 
 /* Write out an IO buffer */
-int bfb_io_write(fd_t fd, const uint8_t *buffer, int length)
+int bfb_io_write(fd_t fd, const void *buffer, int length)
 {
 #ifdef _WIN32
        DWORD bytes;
@@ -79,7 +79,7 @@ int bfb_io_write(fd_t fd, const uint8_t *buffer, int length)
 }
 
 /* Read an answer to an IO buffer of max length bytes */
-int bfb_io_read(fd_t fd, uint8_t *buffer, int length, int timeout)
+int bfb_io_read(fd_t fd, void *buffer, int length, int timeout)
 {
 #ifdef _WIN32
        DWORD bytes;
@@ -123,7 +123,7 @@ int bfb_io_read(fd_t fd, uint8_t *buffer, int length, int 
timeout)
 /**
        Read (repeatedly) from fd until a timeout or an error is encountered.
  */
-static int bfb_io_read_all(int fd, uint8_t *buffer, int length, int timeout)
+static int bfb_io_read_all(int fd, char *buffer, int length, int timeout)
 {
        int actual;
        int pos = 0;
diff --git a/bfb/bfb_io.h b/bfb/bfb_io.h
index 39f54fd..6039340 100644
--- a/bfb/bfb_io.h
+++ b/bfb/bfb_io.h
@@ -38,10 +38,10 @@ extern "C" {
 #endif
 
 /* Write out a BFB buffer */
-int    bfb_io_write(fd_t fd, const uint8_t *buffer, int length);
+int    bfb_io_write(fd_t fd, const void *buffer, int length);
 
 /* Read in a BFB answer */
-int    bfb_io_read(fd_t fd, uint8_t *buffer, int length, int timeout);
+int    bfb_io_read(fd_t fd, void *buffer, int length, int timeout);
 
 /* Send an BFB init command an check for a valid answer frame */
 int    bfb_io_init(fd_t fd);
diff --git a/obexftp/client.c b/obexftp/client.c
index f7ae5f7..b5243e7 100644
--- a/obexftp/client.c
+++ b/obexftp/client.c
@@ -267,7 +267,7 @@ static void client_done(obex_t *handle, obex_object_t 
*object, int UNUSED(obex_c
        uint8_t hi;
        uint32_t hlen;
        const apparam_t *app = NULL;
-       uint8_t *p;
+       char *p;
 
         const uint8_t *body_data = NULL;
        uint32_t body_len = -1;
@@ -1142,7 +1142,7 @@ int obexftp_put_file(obexftp_client_t *cli, const char 
*filename, const char *re
 
        \note A remotename must be given always.
  */
-int obexftp_put_data(obexftp_client_t *cli, const char *data, int size,
+int obexftp_put_data(obexftp_client_t *cli, const uint8_t *data, int size,
                     const char *remotename)
 {
        obex_object_t *object;
diff --git a/obexftp/client.h b/obexftp/client.h
index 01098d3..7712e0c 100644
--- a/obexftp/client.h
+++ b/obexftp/client.h
@@ -100,7 +100,7 @@ typedef struct {
        /* transfer (get) */
        char *target_fn; /* used in get body */
        uint32_t buf_size; /* not size but len... */
-       uint8_t *buf_data;
+       char *buf_data;
        uint32_t apparam_info;
        /* persistence */
        cache_object_t *cache;
@@ -184,7 +184,7 @@ int obexftp_get_type(obexftp_client_t *cli,
 int obexftp_put_file(obexftp_client_t *cli, const char *filename,
                     const char *remotename);
 
-int obexftp_put_data(obexftp_client_t *cli, const char *data, int size,
+int obexftp_put_data(obexftp_client_t *cli, const uint8_t *data, int size,
                     const char *remotename);
 
 int obexftp_del(obexftp_client_t *cli, const char *name);
-- 
1.7.4.1


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Openobex-users mailing list
Openobex-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to