mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.5 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/blindcoder/ircp/dest_hotfix.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. diff -pruN ircp-0.3/src/ircp.c ircp-0.3_patch/src/ircp.c
  20. --- ircp-0.3/src/ircp.c 2002-12-01 18:34:41.000000000 +0100
  21. +++ ircp-0.3_patch/src/ircp.c 2004-05-27 10:23:01.008095904 +0200
  22. @@ -72,10 +72,15 @@ int main(int argc, char *argv[])
  23. return -1;
  24. }
  25. - if(argc >= 3)
  26. + if(argc >= 3){
  27. + downloadpath = (char *)malloc(strlen(argv[2]+1));
  28. + sprintf(downloadpath, "%s", argv[2]);
  29. inbox = argv[2];
  30. - else
  31. + } else {
  32. + downloadpath = (char *)malloc(2);
  33. + sprintf(downloadpath, ".");
  34. inbox = ".";
  35. + }
  36. ircp_srv_recv(srv, inbox);
  37. #ifdef DEBUG_TCP
  38. diff -pruN ircp-0.3/src/ircp.h ircp-0.3_patch/src/ircp.h
  39. --- ircp-0.3/src/ircp.h 2002-12-01 18:34:41.000000000 +0100
  40. +++ ircp-0.3_patch/src/ircp.h 2004-05-27 10:21:24.422779104 +0200
  41. @@ -22,6 +22,8 @@ enum {
  42. IRCP_EV_RECEIVING,
  43. };
  44. +char *downloadpath;
  45. +
  46. /* Number of bytes passed at one time to OBEX */
  47. #define STREAM_CHUNK 4096
  48. diff -pruN ircp-0.3/src/ircp_server.c ircp-0.3_patch/src/ircp_server.c
  49. --- ircp-0.3/src/ircp_server.c 2002-12-01 18:34:41.000000000 +0100
  50. +++ ircp-0.3_patch/src/ircp_server.c 2004-05-27 10:22:44.161656952 +0200
  51. @@ -223,15 +223,19 @@ static int new_file(ircp_server_t *srv,
  52. }
  53. }
  54. if(name == NULL) {
  55. +#if 0
  56. DEBUG(0, "Got a PUT without a name. Refusing\n");
  57. /* Send back error */
  58. OBEX_ObjectSetRsp(object, OBEX_RSP_BAD_REQUEST, OBEX_RSP_BAD_REQUEST);
  59. srv->infocb(IRCP_EV_ERR, "");
  60. goto out;
  61. +#endif
  62. + name=(char *)malloc(28);
  63. + sprintf(name, "ircp_receive_i_have_no_name");
  64. }
  65. srv->infocb(IRCP_EV_RECEIVING, name);
  66. - srv->fd = ircp_open_safe("", name);
  67. + srv->fd = ircp_open_safe(downloadpath, name);
  68. ret = srv->fd;