#38 Working version compiled with libcurl

open
None
5
2005-01-02
2004-12-12
s bond
No

Due to some changes with ebay they are now requiring
signin before bidding. It was suggested by some other
users that the best way to get https support in
bidwatcher would be to compile it with libcurl. I took
this suggestion and now have a working version.
However, when I say working, I mean it works for me. I
don't use ebay motors, I don't use a proxy, and I don't
bid on adult items. These other features will need to
be added later. I am almost certain the proxy stuff
isn't working, but enabling this would be really really
easy with libcurl.

In any event, I only partially removed the old socket
url stuff. A lot of cleanup is really suggested here,
but I won't do this unless someone requests it. I hope
this helps some people.

To get the this to compile. First replace the files in
the source with these patched files. Then run
./configure. Then you need to tell it to link with
libcurl. I didn't bother to edit the configure file,
so you will have to add -lcurl in the Makefile

In other words, the LIBS line should look like:

LIBS = -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk
-rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm
-lcurl

(No line break).

Things could also be improved in terms of efficiency.
It might be slower than necessary since the libcurl
memory copy function that I am using uses a lot of
remalloc, which is slow. Probably better to just give
it a big buffer as was done before. I will attach all
the patched files.

Discussion

  • Chris Ferebee

    Chris Ferebee - 2004-12-12

    Logged In: YES
    user_id=507753

    Works for me, more comments over on bug 1061943.

     
  • s bond

    s bond - 2004-12-13

    Patched bidwatcher.h

     
  • s bond

    s bond - 2004-12-13

    Patched bidwatcher.cpp

     
  • s bond

    s bond - 2004-12-13

    Patched netstuff.cpp

     
  • s bond

    s bond - 2004-12-13

    Logged In: YES
    user_id=1084057

    I just updated the patched files after some initial clean up
    and some (hopefully) improvements in the speed. Basically I
    am using a variable sized char array for storing the
    returned webpage which requires realloc if the array is too
    small. To improve the speed I set an initial size which is
    probably as big as we will need, and this eliminates most of
    the reallocs. I also removed most of the old structures,
    features in the old URL class since libcurl takes care of
    most of this. Same compiling instructions apply. And
    again, I really doubt this will work with a proxy since I
    have never done any programming with proxies, but libcurl is
    supposed to handle proxies automatically for you, so it
    shouldn't be too hard to make it work.

    Feedback is welcomed.

     
  • Moritz Barsnick

    Moritz Barsnick - 2004-12-14

    Logged In: YES
    user_id=266151

    I (need to) use an HTTP(S) proxy. This version stops
    before any items are displayed, prompting me for "proxy
    password:" (curl code). My proxy requires no password
    though. libcurl documentation (online or on disk) didn't
    help me about this one...

     
  • Moritz Barsnick

    Moritz Barsnick - 2004-12-14

    Logged In: YES
    user_id=266151

    I've submitted a unified diff as a patch file for sdbond's
    modifications as patch #1085302. Also a patch against
    bidwatcher-1.3.16-jan-8 is included there.

     
  • Kevin Dwyer

    Kevin Dwyer - 2005-01-02

    Logged In: YES
    user_id=285914

    Hey guys, I just reworked this patch and committed it to the
    STABLE_1_3 branch. Please test, and thanks!

     
  • Kevin Dwyer

    Kevin Dwyer - 2005-01-02
    • assigned_to: nobody --> kevindication
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks