OpenSDE Packages Database (without history before r20070)
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.

73 lines
2.3 KiB

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