handle: Add CURL* and CURLcode vars to struct
commit278c84710637a891c3407c3811f61b181359ea75
authorDave Reisner <d@falconindy.com>
Sat, 15 Jan 2011 18:59:45 +0000 (15 13:59 -0500)
committerDave Reisner <d@falconindy.com>
Wed, 9 Mar 2011 20:22:32 +0000 (9 15:22 -0500)
tree9fa1b4d96f7db3e614ebb25ab4780882959f7d37
parent75bfe825fc4018173b0d7a3c4029094edb52d93a
handle: Add CURL* and CURLcode vars to struct

Adding the CURLcode is necessary in order to return an error string from
pm_error. Unlike libfetch, curl returns numerical error numbers and does
not maintain a staticly allocated string with the last error generated.

Adding the curl object itself to the handle is advantageous (and
encouraged by curl_easy_perform(3)) because the handle is reusable for
successive operations. This cuts back on overhead when downloading
multiple files in a single transaction.

Signed-off-by: Dave Reisner <d@falconindy.com>
lib/libalpm/handle.c
lib/libalpm/handle.h