Menu

#287 fixing proxy troubles

Bug
open
nobody
None
5
2004-11-07
2004-11-07
Anonymous
No

in discdb.c
in the function DiscDBMakeRequest()

after the proxy is set with curl_easy_setopt
the GString is freed immediately.

on my system this causes the proxy lookup to always fail.

the libcurl2 docs say :
NOTE: strings passed to libcurl as 'char *' arguments,
will not be copied by the library. Instead you should
keep them available until libcurl no longer needs them.
Failing to do so will cause very odd behavior or even
crashes. libcurl will need them until you call
curl_easy_cleanup(3) or you set the same option again
to use a different pointer.

i moved the g_string_free call to the end of the function,
and replaced proxy with proxy->str in the option call,
and now i have track listings. yay !

might be worth a look to see if this problem
could pop up anywhere else.

--matt

Discussion

  • Nobody/Anonymous

    Logged In: NO

    See patch 1063305
    Dup of bugs 1032246, 1032769, and 1033500

     
  • Nobody/Anonymous

    Logged In: NO

    Updated patch to fix some other proxy issues the matt
    mentioned but that I failed to pick up on. Also, fixed a
    memory access error that was causing random crashes because
    we were using the variable user before allocating memory for
    it. See patch 1063456
    --
    Brett <skip_spm@imap.cc>

     

Log in to post a comment.