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.

72 lines
2.3 KiB

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