patch-src_daap_c 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. $OpenBSD: patch-src_daap_c,v 1.1 2008/07/18 14:29:42 naddy Exp $
  2. --- src/daap.c.orig Sat Apr 19 15:17:23 2008
  3. +++ src/daap.c Fri Jul 4 10:17:01 2008
  4. @@ -175,7 +175,7 @@ int daap_add_mdcl(DAAP_BLOCK *root, char *tag, char *n
  5. mdcl=daap_add_empty(root,"mdcl");
  6. if(mdcl) {
  7. - g=(int)daap_add_string(mdcl,"mcnm",tag);
  8. + g = !!daap_add_string(mdcl,"mcnm",tag);
  9. g = g && daap_add_string(mdcl,"mcna",name);
  10. g = g && daap_add_short(mdcl,"mcty",number);
  11. }
  12. @@ -202,7 +202,7 @@ DAAP_BLOCK *daap_response_content_codes(void) {
  13. root=daap_add_empty(NULL,"mccr");
  14. if(root) {
  15. - g = (int)daap_add_int(root,"mstt",200);
  16. + g = !!daap_add_int(root,"mstt",200);
  17. while(current->type) {
  18. g = g && daap_add_mdcl(root,current->tag,current->description,
  19. @@ -235,7 +235,7 @@ DAAP_BLOCK *daap_response_login(char *hostname) {
  20. root=daap_add_empty(NULL,"mlog");
  21. if(root) {
  22. - g = (int)daap_add_int(root,"mstt",200);
  23. + g = !!daap_add_int(root,"mstt",200);
  24. session=config_get_next_session();
  25. g = g && daap_add_int(root,"mlid",session);
  26. }
  27. @@ -437,7 +437,7 @@ DAAP_BLOCK *daap_response_songlist(char* metaStr, char
  28. root=daap_add_empty(NULL,"adbs");
  29. if(root) {
  30. - g = (int)daap_add_int(root,"mstt",200);
  31. + g = !!daap_add_int(root,"mstt",200);
  32. g = g && daap_add_char(root,"muty",0);
  33. g = g && daap_add_int(root,"mtco",0);
  34. g = g && daap_add_int(root,"mrco",0);
  35. @@ -630,7 +630,7 @@ DAAP_BLOCK *daap_response_update(int fd, int clientver
  36. root=daap_add_empty(NULL,"mupd");
  37. if(root) {
  38. - g = (int)daap_add_int(root,"mstt",200);
  39. + g = !!daap_add_int(root,"mstt",200);
  40. /* theoretically, this would go up if the db changes? */
  41. g = g && daap_add_int(root,"musr",db_version());
  42. }
  43. @@ -661,7 +661,7 @@ DAAP_BLOCK *daap_response_playlists(char *name) {
  44. root=daap_add_empty(NULL,"aply");
  45. if(root) {
  46. - g = (int)daap_add_int(root,"mstt",200);
  47. + g = !!daap_add_int(root,"mstt",200);
  48. g = g && daap_add_char(root,"muty",0);
  49. g = g && daap_add_int(root,"mtco",1 + db_get_playlist_count());
  50. g = g && daap_add_int(root,"mrco",1 + db_get_playlist_count());
  51. @@ -731,7 +731,7 @@ DAAP_BLOCK *daap_response_dbinfo(char *name) {
  52. root=daap_add_empty(NULL,"avdb");
  53. if(root) {
  54. - g = (int)daap_add_int(root,"mstt",200);
  55. + g = !!daap_add_int(root,"mstt",200);
  56. g = g && daap_add_char(root,"muty",0);
  57. g = g && daap_add_int(root,"mtco",1);
  58. g = g && daap_add_int(root,"mrco",1);
  59. @@ -788,7 +788,7 @@ DAAP_BLOCK *daap_response_server_info(char *name, char
  60. apro = 2 << 16;
  61. }
  62. - g = (int)daap_add_int(root,"mstt",200); /* result */
  63. + g = !!daap_add_int(root,"mstt",200); /* result */
  64. g = g && daap_add_int(root,"mpro",mpro); /* dmap proto ? */
  65. g = g && daap_add_int(root,"apro",apro); /* daap protocol */
  66. @@ -889,7 +889,7 @@ DAAP_BLOCK *daap_response_playlist_items(unsigned int
  67. root=daap_add_empty(NULL,"apso");
  68. if(root) {
  69. - g = (int)daap_add_int(root,"mstt",200);
  70. + g = !!daap_add_int(root,"mstt",200);
  71. g = g && daap_add_char(root,"muty",0);
  72. g = g && daap_add_int(root,"mtco",0);
  73. g = g && daap_add_int(root,"mrco",0);