equal
deleted
inserted
replaced
26 |
26 |
27 #include "common.h" |
27 #include "common.h" |
28 #include "setup-mp3.h" |
28 #include "setup-mp3.h" |
29 #include "stream.h" |
29 #include "stream.h" |
30 #include "network.h" |
30 #include "network.h" |
|
31 #include "data.h" |
31 #include "menu-async.h" |
32 #include "menu-async.h" |
32 #include "i18n.h" |
33 #include "i18n.h" |
33 #include "version.h" |
34 #include "version.h" |
34 |
35 |
35 #define USE_MMAP |
36 #define USE_MMAP |
364 bool cNetStream::SendRequest(void) |
365 bool cNetStream::SendRequest(void) |
365 { |
366 { |
366 bool res=false; |
367 bool res=false; |
367 char buff[2048]; |
368 char buff[2048]; |
368 |
369 |
369 char *h, *p; |
370 char *p; |
370 asprintf(&h,port!=DEFAULT_PORT ? "%s:%d":"%s",host,port); |
371 char *h=aprintf(port!=DEFAULT_PORT ? "%s:%d":"%s",host,port); |
371 if(MP3Setup.UseProxy) asprintf(&p,"http://%s%s",h,path); |
372 if(MP3Setup.UseProxy) p=aprintf("http://%s%s",h,path); |
372 else asprintf(&p,"%s",path); |
373 else p=aprintf("%s",path); |
373 |
374 |
374 char a[1024]; |
375 char a[1024]; |
375 a[0]=0; |
376 a[0]=0; |
376 if(auth) { |
377 if(auth) { |
377 cBase64Encoder b64((uchar *)auth,strlen(auth),76); |
378 cBase64Encoder b64((uchar *)auth,strlen(auth),76); |