Advertisement
Guest User

Untitled

a guest
May 10th, 2017
564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. diff --git a/ChangeLog b/ChangeLog
  2. index d8898c8..391cf8b 100644
  3. --- a/ChangeLog
  4. +++ b/ChangeLog
  5. @@ -1,3 +1,8 @@
  6. +2009-01-05 Gabriel Falc�o <gabriel@ananda.vrindavan>
  7. +
  8. + * src/downloader.vala: Removing an unsatisfactory object handling
  9. + in the constructor of HttpBackend.
  10. +
  11. 2009-01-04 Gabriel Falc�o <gabriel@ananda.vrindavan>
  12.  
  13. * Now the project is called Ainur!
  14. diff --git a/src/downloader.vala b/src/downloader.vala
  15. index 9cf2c31..7f63cc5 100644
  16. --- a/src/downloader.vala
  17. +++ b/src/downloader.vala
  18. @@ -86,28 +86,26 @@ namespace Ainur {
  19. public string username;
  20. public string password;
  21. public HashMap<string, string> other_credentials;
  22. - public SessionSync session;
  23. + private SessionSync session;
  24.  
  25. public HttpBackend (string username,
  26. string password,
  27. bool connect_now=false,
  28. - HashMap? other_credentials=null)
  29. + HashMap other_credentials=new_hash())
  30. {
  31. + this.headers = new_hash();
  32. + this.body = new_hash();
  33. + this.session = new SessionSync();
  34. +
  35. this.username = username;
  36. this.password = password;
  37. this.is_connected = false;
  38. - this.other_credentials = other_credentials == null ? new_hash() : other_credentials;
  39. - this.session = new SessionSync();
  40. - this.headers = new_hash();
  41. - this.body = new_hash();
  42. + this.other_credentials = other_credentials;
  43. +
  44. if (connect_now == true)
  45. this.connect();
  46. }
  47.  
  48. - ~HttpBackend () {
  49. - this.disconnect();
  50. - }
  51. -
  52. private void handle_cookies (Message msg) {
  53. string cookies;
  54. cookies = msg.response_headers.get("set-cookie");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement