1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00
Commit Graph

45 Commits

Author SHA1 Message Date
Brenden Matthews
308f2cb8ea
Update copyright, authors. 2021-02-27 09:14:19 -06:00
Andrew Deason
5651cf1529 Remove length limit on curl URLs
Currently, the ${curl} directive only uses the first 127 characters in
the given URL, discarding the rest. Change the parsing in
curl_parse_arg to dynamically allocate the URL string instead,
allowing ${curl} to use URLs of any length.
2020-02-05 18:06:26 -05:00
Brenden Matthews
46abd3b75a Apply fixes from clang-tidy/format. 2019-02-23 17:13:19 -05:00
lasers
7eec746b82 update copyright year to 2019 2019-01-05 11:15:36 -06:00
Brenden Matthews
45b4c80ec2
Fix compiler warnings. 2018-12-20 21:20:43 -05:00
Brenden Matthews
3a3092902e
Get rid of silly if (not ... exp. (#713)
* Get rid of silly `if (not ...` exp.

* Apply code fixes from sonar.

* Build fix.

* Apply more fixes from sonar.

* Apply more fixes from sonar.

* Apply more fixes from sonar.
2018-12-20 10:22:08 -05:00
Nikolas Garofil
5dd23796a6 Use unsigned int for p_max_size in obj_cb.print 2018-08-08 15:54:47 -04:00
Brenden Matthews
4b92556fca
Build improvements: clang-tidy, sonar, Dockerfile. (#488) 2018-05-12 19:26:31 -04:00
Brenden Matthews
eebc8c653b
Add formatting/static analysis (#486)
* Reform source with clang-format.

Rules applied with:
    $ find . -iname *.h -o -iname *.cc | xargs clang-format \
        -style=file -i -fallback-style=google

* Add clang-format and analyze to build.

Based on the excellent work at: https://github.com/ttroy50/cmake-examples

* Clean up CMake stuff on macOS.

* Remove vim/emacs modelines.

* Update copyright dates.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.

* Build fixes.
2018-05-12 12:03:00 -04:00
Nelis Oostens
0ab7d5fa33 Fixed Curl header issue
Note: This may not be the correct solution, it depends on the author's intention. Maybe he wanted to keep the headers from the previous call (in other words if there are no new headers use the old ones) and didn't realize they weren't copied in the handle, in which case he'll have to save the headers instead of above.
2015-08-19 22:04:42 +02:00
Pavel Labath
cbc131ea6c Fix curl-related crashes (sf.net #3386728)
curl implements some of the timeouts using alarm(), where the alarm handler longjmp()s back into the
curl code. This is a bad idea in multi-threaded applications, since it is not guaranteed that
SIGALARM will be recieved by the correct thread. Therefore, we instruct curl to avoid using
signals.

Conflicts:

	src/ccurl_thread.c
2012-10-24 23:25:10 +02:00
Pavel Labath
b34a1a21e7 Use lround instead of std::lround
for unknown reasons DragonFly's gcc does not have lround in the std namespace
cf. sf.net #3289079
2012-07-13 20:17:54 +02:00
Brenden Matthews
ddef05d4eb Update version, copyright. 2012-05-03 16:34:44 -07:00
Pavel Labath
1321a41015 Fix 'conky-1.8.1 does not build with curl-7.21.7' (sf.net #3383906)
In the new version of curl, types.h no longer exists. I just removed the offending include as
is seems to be unnecessary.

bug reported by billie80.
2011-08-01 22:40:23 +02:00
Pavel Labath
10d7605a51 use get_result_copy() instead of get_result()
i don't seem to follow my own advice :/
2011-01-06 15:32:10 +01:00
Pavel Labath
b0deb283ec make $curl use the new callback system instead of timed_thread
ps: this breaks $rss and $weather, they need to be ported as well
2011-01-06 15:29:51 +01:00
Pavel Labath
0852aa4fcd Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/ccurl_thread.cc
	src/conky.cc
	src/llua.cc
	src/logging.h
	src/nvidia.cc
2010-11-13 20:05:59 +01:00
Pavel Labath
d899f603d3 Fix some obvious errors in ccurl_thread.cc
However, the whole thing still doesn't quite work for me.... It crashes on exit.
2010-11-12 20:00:24 +01:00
Brenden Matthews
ca9acc13c0 C++ify some curl stuff. 2010-10-14 17:28:57 -07:00
Dan McGee
93c6baebb6 Enable use of HTTP cache headers in curl plugin
This will allow us to get 304 responses back from remote URLs that we are
grabbing using the curl, weather, and rss plugins. The first time we fetch a
resource, we will always get the full content, but from there on out we will
store any provided 'Etag' or 'Last-Modified' header, and submit these on the
next request. If we get a 304 response back, we won't have to do any work at
all.

This benefits both us (bandwidth and parsing savings) and remote URLs (we
actually make an attempt to not retrieve the same resource over and over
again).
2010-10-14 17:04:32 -07:00
Brenden Matthews
15006a1a41 Fix warning. 2010-10-05 13:22:27 -07:00
Ben Kibbey
5a898d373e Abort curl transfers if they drop below 1000B/s for more than 60s.
Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
2010-10-05 12:09:55 -07:00
Brenden Matthews
5b0dee741c Improve curl code. 2010-10-05 11:56:08 -07:00
Pavel Labath
ef24f62412 Merge remote branch 'origin/master' into lua-config
Conflicts:
	src/conky.cc
2010-09-11 14:50:37 +02:00
Pavel Labath
47d9a63dff Make update_interval{,_on_battery} lua settings 2010-09-11 14:25:19 +02:00
Pavel Labath
ef2b39a97f Make text_buffer_size a lua setting 2010-08-29 23:50:32 +02:00
Pavel Labath
a9893684ac Make max_user_text a lua setting 2010-08-29 20:01:05 +02:00
Pavel Labath
77d4a55dcc Fix segfault in ccurl_thread.cc
curl_global_init() is not thread-safe, it must be called at the start of main()
2010-08-29 13:42:07 +02:00
Pavel Labath
945b52b9a6 Use pass-by-reference paramers in ccurl_thread where possible 2010-06-17 15:19:31 +02:00
Pavel Labath
1cf1b5c631 Fix overflow in ccurl_thread interval caused by 0f213c89 2010-06-17 15:12:42 +02:00
Pavel Labath
0f213c89f2 Simplify timed_thread time calculations with some c++0x magic 2010-06-10 19:19:49 +02:00
Nikolas Garofil
3b427bf004 Bugfix: segfault in curl-related code 2010-04-22 16:35:00 +02:00
Nikolas Garofil
28bf02a451 Removed cleanup functions added in the previous 2 commits
These functions are not everywhere supported.
2010-04-22 12:33:14 +02:00
Nikolas Garofil
bb34971fbf Remove some more memleaks in the curl code, also caused by openssl 2010-04-22 00:47:06 +02:00
Nikolas Garofil
986e1251ae Removed one of the memleaks in curl caused by openssl 2010-04-22 00:05:56 +02:00
Nikolas Garofil
93de6a1798 Fix bug in previous commit and a old memleak in curl 2010-04-19 22:25:50 +02:00
Nikolas Garofil
bc5a414594 $curl can now use 0 (immediately) as interval 2010-04-19 17:19:56 +02:00
Nikolas Garofil
e7ed9a5060 Revert "Use "using namespace std;" and remove all std::'s"
This reverts commit 41e80b9833.
2010-02-24 20:10:26 +01:00
Nikolas Garofil
41e80b9833 Use "using namespace std;" and remove all std::'s
I'm doing this because otherwise i'll will forget to add all those
std::'s and will lose a LOT of time finding the problems.
If you don't agree, undo this patch...
...but i hope you won't :)
2010-02-24 19:39:45 +01:00
Nikolas Garofil
c51972b5e2 Use free_and_zero in ccurl_common.cc where appropriate 2010-02-23 15:48:18 +01:00
Pavel Labath
d7d8bb84ea Add missing include 2010-02-23 15:07:12 +01:00
Nikolas Garofil
0e80e2908a Use free_and_zero in ccurl_thread.cc where appropriate 2010-02-23 14:54:03 +01:00
Pavel Labath
e554e6ff67 If we want a function to change the object, we need to pass it by reference 2010-01-07 19:50:00 +01:00
Brenden Matthews
3e3dd16367 Update modelines and stuff. 2010-01-06 19:45:19 -08:00
Brenden Matthews
d3a8c4d22e timed_thread
Convert everything (everything? maybe missed some stuff) from old
timed_thread to new timed_thread.
2010-01-04 19:21:12 -08:00