]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/mt-daapd/files/itunes-5-fix.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / mt-daapd / files / itunes-5-fix.patch
1 # WARNING: this is a copy of the same file off www.mt-daapd.org with
2 # the path names fixed so that it works in OE
3 --- S/src/daap.c.orig   2005-09-07 21:41:41.000000000 -0500
4 +++ S/src/daap.c        2005-09-07 21:44:25.000000000 -0500
5 @@ -770,26 +770,28 @@
6  DAAP_BLOCK *daap_response_server_info(char *name, char *client_version) {
7      DAAP_BLOCK *root;
8      int g=1;
9 +    int mpro = 2 << 16;
10 +    int apro = 3 << 16;
11  
12      DPRINTF(E_DBG,L_DAAP,"Preparing to send server-info for client ver %s\n",client_version);
13  
14      root=daap_add_empty(NULL,"msrv");
15  
16      if(root) {
17 -       g = (int)daap_add_int(root,"mstt",200); /* result */
18 -       if((!client_version)||(!strcmp(client_version,"3.0"))) {
19 -           g = g && daap_add_int(root,"mpro",2 << 16); /* dmap proto ? */
20 -           g = g && daap_add_int(root,"apro",3 << 16); /* daap protocol */
21 -       } else {
22 -           if(!strcmp(client_version,"1.0")) {
23 -               g = g && daap_add_int(root,"mpro",1 << 16); /* dmap proto ? */
24 -               g = g && daap_add_int(root,"apro",1 << 16); /* daap protocol */
25 -           } else if(!strcmp(client_version,"2.0")) {
26 -               g = g && daap_add_int(root,"mpro",1 << 16); /* dmap proto ? */
27 -               g = g && daap_add_int(root,"apro",2 << 16); /* daap protocol */
28 -           }
29 +       if((client_version) && (!strcmp(client_version,"1.0"))) {
30 +           mpro = 1 << 16;
31 +           apro = 1 << 16;
32 +       }
33 +
34 +       if((client_version) && (!strcmp(client_version,"2.0"))) {
35 +           mpro = 1 << 16;
36 +           apro = 2 << 16;
37         }
38  
39 +       g = (int)daap_add_int(root,"mstt",200); /* result */
40 +       g = g && daap_add_int(root,"mpro",mpro); /* dmap proto ? */
41 +       g = g && daap_add_int(root,"apro",apro); /* daap protocol */
42 +
43         g = g && daap_add_string(root,"minm",name); /* server name */
44  
45  #if 0