From: Luiz Augusto von Dentz <luiz.von.de...@intel.com> ircp_server.c: In function ‘ircp_srv_receive’: ircp_server.c:303:1: error: ISO C90 forbids mixed declarations and code ircp_server.c: In function ‘ircp_srv_recv’: ircp_server.c:346:6: error: variable ‘err’ set but not used ircp_server.c: In function ‘ircp_srv_receive’: ircp_server.c:369:1: error: expected declaration or statement at end of input ircp_server.c:369:1: error: control reaches end of non-void function cc1: all warnings being treated as errors --- apps/ircp/ircp_client.c | 5 +++++ apps/ircp/ircp_server.c | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/apps/ircp/ircp_client.c b/apps/ircp/ircp_client.c index 7f10d0c..1acd4a8 100644 --- a/apps/ircp/ircp_client.c +++ b/apps/ircp/ircp_client.c @@ -395,6 +395,11 @@ int ircp_put(ircp_client_t *cli, char *name) char *dirname; err = chdir(name); + if (err < 0) { + perror("chdir:"); + return -1; + } + name = "."; /* Get real name of new wd, extract last part of and do setpath to it */ diff --git a/apps/ircp/ircp_server.c b/apps/ircp/ircp_server.c index 08de942..749a84e 100644 --- a/apps/ircp/ircp_server.c +++ b/apps/ircp/ircp_server.c @@ -285,8 +285,13 @@ int ircp_srv_receive(ircp_server_t *srv, obex_object_t *object, int finished) srv->infocb(IRCP_EV_OK, ""); } else { - if(srv->fd > 0) + if(srv->fd > 0) { len = write(srv->fd, body, body_len); + if (len < 0) { + perror("write:"); + return -1; + } + } } return 1; } @@ -360,6 +365,8 @@ int ircp_srv_recv(ircp_server_t *srv, char *inbox) /* Go back to inbox */ err = chdir(inbox); - + if (err < 0) + perror("chdir:"); + return ret; } -- 1.7.5.2 ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Openobex-users mailing list Openobex-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/openobex-users