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.

57 lines
1.6 KiB

  1. diff -pruN ircp-0.3/src/ircp.c ircp-0.3_patch/src/ircp.c
  2. --- ircp-0.3/src/ircp.c 2002-12-01 18:34:41.000000000 +0100
  3. +++ ircp-0.3_patch/src/ircp.c 2004-05-27 10:23:01.008095904 +0200
  4. @@ -72,10 +72,15 @@ int main(int argc, char *argv[])
  5. return -1;
  6. }
  7. - if(argc >= 3)
  8. + if(argc >= 3){
  9. + downloadpath = (char *)malloc(strlen(argv[2]+1));
  10. + sprintf(downloadpath, "%s", argv[2]);
  11. inbox = argv[2];
  12. - else
  13. + } else {
  14. + downloadpath = (char *)malloc(2);
  15. + sprintf(downloadpath, ".");
  16. inbox = ".";
  17. + }
  18. ircp_srv_recv(srv, inbox);
  19. #ifdef DEBUG_TCP
  20. diff -pruN ircp-0.3/src/ircp.h ircp-0.3_patch/src/ircp.h
  21. --- ircp-0.3/src/ircp.h 2002-12-01 18:34:41.000000000 +0100
  22. +++ ircp-0.3_patch/src/ircp.h 2004-05-27 10:21:24.422779104 +0200
  23. @@ -22,6 +22,8 @@ enum {
  24. IRCP_EV_RECEIVING,
  25. };
  26. +char *downloadpath;
  27. +
  28. /* Number of bytes passed at one time to OBEX */
  29. #define STREAM_CHUNK 4096
  30. diff -pruN ircp-0.3/src/ircp_server.c ircp-0.3_patch/src/ircp_server.c
  31. --- ircp-0.3/src/ircp_server.c 2002-12-01 18:34:41.000000000 +0100
  32. +++ ircp-0.3_patch/src/ircp_server.c 2004-05-27 10:22:44.161656952 +0200
  33. @@ -223,15 +223,19 @@ static int new_file(ircp_server_t *srv,
  34. }
  35. }
  36. if(name == NULL) {
  37. +#if 0
  38. DEBUG(0, "Got a PUT without a name. Refusing\n");
  39. /* Send back error */
  40. OBEX_ObjectSetRsp(object, OBEX_RSP_BAD_REQUEST, OBEX_RSP_BAD_REQUEST);
  41. srv->infocb(IRCP_EV_ERR, "");
  42. goto out;
  43. +#endif
  44. + name=(char *)malloc(28);
  45. + sprintf(name, "ircp_receive_i_have_no_name");
  46. }
  47. srv->infocb(IRCP_EV_RECEIVING, name);
  48. - srv->fd = ircp_open_safe("", name);
  49. + srv->fd = ircp_open_safe(downloadpath, name);
  50. ret = srv->fd;