stream.c
branchtrunk
changeset 29 640ce9201139
parent 9 dc75c2890a31
child 34 afc13760179b
     1.1 --- a/stream.c	Mon Aug 17 20:55:55 2009 +0800
     1.2 +++ b/stream.c	Mon Aug 17 20:56:48 2009 +0800
     1.3 @@ -28,6 +28,7 @@
     1.4  #include "setup-mp3.h"
     1.5  #include "stream.h"
     1.6  #include "network.h"
     1.7 +#include "data.h"
     1.8  #include "menu-async.h"
     1.9  #include "i18n.h"
    1.10  #include "version.h"
    1.11 @@ -366,10 +367,10 @@
    1.12    bool res=false;
    1.13    char buff[2048];
    1.14  
    1.15 -  char *h, *p;
    1.16 -  asprintf(&h,port!=DEFAULT_PORT ? "%s:%d":"%s",host,port);
    1.17 -  if(MP3Setup.UseProxy) asprintf(&p,"http://%s%s",h,path);
    1.18 -  else asprintf(&p,"%s",path);
    1.19 +  char *p;
    1.20 +  char *h=aprintf(port!=DEFAULT_PORT ? "%s:%d":"%s",host,port);
    1.21 +  if(MP3Setup.UseProxy) p=aprintf("http://%s%s",h,path);
    1.22 +  else p=aprintf("%s",path);
    1.23  
    1.24    char a[1024];
    1.25    a[0]=0;