projects
/
ppastats.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9d8ca12
)
code style, added missing 'const' (DEFAULT_FETCH_RETRIES)
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Sat, 5 May 2012 20:41:50 +0000
(20:41 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Sat, 5 May 2012 20:41:50 +0000
(20:41 +0000)
src/lp_ws.c
patch
|
blob
|
history
diff --git
a/src/lp_ws.c
b/src/lp_ws.c
index
b6957eb
..
5eca19a
100644
(file)
--- a/
src/lp_ws.c
+++ b/
src/lp_ws.c
@@
-30,13
+30,12
@@
#include "lp_json.h"
#include "ppastats.h"
#include "lp_json.h"
#include "ppastats.h"
-#define QUERY_GET_PUBLISHED_BINARIES \
- "?ws.op=getPublishedBinaries"
-#define QUERY_GET_DOWNLOAD_COUNT "?ws.op=getDownloadCount"
-#define QUERY_GET_DAILY_DOWNLOAD_TOTALS \
- "?ws.op=getDailyDownloadTotals"
+static const char *QUERY_GET_PUBLISHED_BINARIES = "?ws.op=getPublishedBinaries";
+static const char *QUERY_GET_DOWNLOAD_COUNT = "?ws.op=getDownloadCount";
+static const char *
+QUERY_GET_DAILY_DOWNLOAD_TOTALS = "?ws.op=getDailyDownloadTotals";
-static int DEFAULT_FETCH_RETRIES = 3;
+static
const
int DEFAULT_FETCH_RETRIES = 3;
static CURL *curl;
static CURL *curl;
@@
-106,7
+105,11
@@
static char *fetch_url(const char *url)
case 503:
case 504:
if (retries) {
case 503:
case 504:
if (retries) {
- fprintf(stderr, "Fetch failed: %ld\n", code);
+ fprintf(stderr,
+ "Fetch failed: with code %ld "
+ "for URL= %s\n",
+ code,
+ url);
if (debug)
printf("Wait 5s before retry.\n");
if (debug)
printf("Wait 5s before retry.\n");