Switch to unified view

a/src/mediaserver/cdplugins/curlfetch.cpp b/src/mediaserver/cdplugins/curlfetch.cpp
...
...
166
    m->curl_http_code = 200;
166
    m->curl_http_code = 200;
167
    m->curl_data_count = 0;
167
    m->curl_data_count = 0;
168
    m->outqueue->reset();
168
    m->outqueue->reset();
169
}
169
}
170
170
171
bool CurlFetch::curlDone(int *curlcode, int *http_code)
171
bool CurlFetch::fetchDone(FetchStatus *code, int *http_code)
172
{
172
{
173
    LOGDEB1("CurlFetch::curlDone: running: " << m->curlrunning() <<
173
    LOGDEB1("CurlFetch::fetchDone: running: " << m->curlrunning() <<
174
           " curldone " << m->curldone << endl);
174
           " curldone " << m->curldone << endl);
175
    unique_lock<mutex> lock(m->curlmutex);
175
    unique_lock<mutex> lock(m->curlmutex);
176
    if (!m->curldone) {
176
    if (!m->curldone) {
177
        return false;
177
        return false;
178
    }
178
    }
179
    LOGDEB1("CurlFetch::curlDone: curlcode " << m->curl_code << " httpcode " <<
179
    LOGDEB1("CurlFetch::fetchDone: curlcode " << m->curl_code << " httpcode " <<
180
           m->curl_http_code << endl);
180
           m->curl_http_code << endl);
181
    if (curlcode) {
181
    if (code) {
182
        *curlcode = int(m->curl_code);
182
        switch (m->curl_code) {
183
        case CURLE_PARTIAL_FILE:
184
        case CURLE_RECV_ERROR:
185
            *code = NetFetch::FETCH_RETRYABLE;
186
            break;
187
        case CURLE_OK:
188
            *code = NetFetch::FETCH_OK;
189
            break;
190
        default:
191
            *code = NetFetch::FETCH_FATAL;
192
            break;
193
        }
183
    }
194
    }
184
    if (http_code) {
195
    if (http_code) {
185
        *http_code = m->curl_http_code;
196
        *http_code = m->curl_http_code;
186
    }
197
    }
187
    LOGDEB1("CurlTRans::curlDone: done\n");
198
    LOGDEB1("CurlTRans::fetchDone: done\n");
188
    return true;
199
    return true;
189
}
200
}
190
201
191
bool CurlFetch::waitForHeaders(int secs)
202
bool CurlFetch::waitForHeaders(int secs)
192
{
203
{