# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/blindcoder/ircp/dest_hotfix.patch # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at https://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # --- ROCK-COPYRIGHT-NOTE-END --- diff -pruN ircp-0.3/src/ircp.c ircp-0.3_patch/src/ircp.c --- ircp-0.3/src/ircp.c 2002-12-01 18:34:41.000000000 +0100 +++ ircp-0.3_patch/src/ircp.c 2004-05-27 10:23:01.008095904 +0200 @@ -72,10 +72,15 @@ int main(int argc, char *argv[]) return -1; } - if(argc >= 3) + if(argc >= 3){ + downloadpath = (char *)malloc(strlen(argv[2]+1)); + sprintf(downloadpath, "%s", argv[2]); inbox = argv[2]; - else + } else { + downloadpath = (char *)malloc(2); + sprintf(downloadpath, "."); inbox = "."; + } ircp_srv_recv(srv, inbox); #ifdef DEBUG_TCP diff -pruN ircp-0.3/src/ircp.h ircp-0.3_patch/src/ircp.h --- ircp-0.3/src/ircp.h 2002-12-01 18:34:41.000000000 +0100 +++ ircp-0.3_patch/src/ircp.h 2004-05-27 10:21:24.422779104 +0200 @@ -22,6 +22,8 @@ enum { IRCP_EV_RECEIVING, }; +char *downloadpath; + /* Number of bytes passed at one time to OBEX */ #define STREAM_CHUNK 4096 diff -pruN ircp-0.3/src/ircp_server.c ircp-0.3_patch/src/ircp_server.c --- ircp-0.3/src/ircp_server.c 2002-12-01 18:34:41.000000000 +0100 +++ ircp-0.3_patch/src/ircp_server.c 2004-05-27 10:22:44.161656952 +0200 @@ -223,15 +223,19 @@ static int new_file(ircp_server_t *srv, } } if(name == NULL) { +#if 0 DEBUG(0, "Got a PUT without a name. Refusing\n"); /* Send back error */ OBEX_ObjectSetRsp(object, OBEX_RSP_BAD_REQUEST, OBEX_RSP_BAD_REQUEST); srv->infocb(IRCP_EV_ERR, ""); goto out; +#endif + name=(char *)malloc(28); + sprintf(name, "ircp_receive_i_have_no_name"); } srv->infocb(IRCP_EV_RECEIVING, name); - srv->fd = ircp_open_safe("", name); + srv->fd = ircp_open_safe(downloadpath, name); ret = srv->fd;