fix error handling in fetching subject list.
@@ -1,7 +1,7 @@ | ||
1 | 1 | /* |
2 | 2 | * subjectretriever.c |
3 | 3 | * |
4 | - * Copyright (c) 2009-2012 project bchan | |
4 | + * Copyright (c) 2009-2014 project bchan | |
5 | 5 | * |
6 | 6 | * This software is provided 'as-is', without any express or implied |
7 | 7 | * warranty. In no event will the authors be held liable for any damages |
@@ -201,6 +201,7 @@ | ||
201 | 201 | } else if (hevent->type == HTTP_CONNECTOR_EVENTTYPE_ERROR) { |
202 | 202 | http_connector_deleteendpoint(connector, hevent->endpoint); |
203 | 203 | retriever->endpoint = -1; |
204 | + return SBJTRETRIEVER_REQUEST_ERROR; | |
204 | 205 | } else { |
205 | 206 | /* error */ |
206 | 207 | return -1; |
@@ -1,7 +1,7 @@ | ||
1 | 1 | /* |
2 | 2 | * subjectretriever.h |
3 | 3 | * |
4 | - * Copyright (c) 2009-2012 project bchan | |
4 | + * Copyright (c) 2009-2014 project bchan | |
5 | 5 | * |
6 | 6 | * This software is provided 'as-is', without any express or implied |
7 | 7 | * warranty. In no event will the authors be held liable for any damages |
@@ -39,6 +39,7 @@ | ||
39 | 39 | IMPORT Bool sbjtretriever_iswaitingendpoint(sbjtretriever_t *retriever, ID endpoint); |
40 | 40 | IMPORT W sbjtretriever_recievehttpevent(sbjtretriever_t *retriever, sbjtcache_t *cache, http_connector_event *hevent); |
41 | 41 | |
42 | +#define SBJTRETRIEVER_REQUEST_ERROR -1 | |
42 | 43 | #define SBJTRETRIEVER_REQUEST_NOT_MODIFIED 0 |
43 | 44 | #define SBJTRETRIEVER_REQUEST_ALLRELOAD 1 |
44 | 45 | #define SBJTRETRIEVER_REQUEST_WAITNEXT 2 |