*** empty log message ***
This commit is contained in:
parent
3c990ad7cf
commit
b1df15b16d
|
@ -423,7 +423,7 @@ static int mms_load_ua_profile_cache(char *dir)
|
|||
|
||||
static MmsUaProfile *profile_fetch(Octstr *profile_url)
|
||||
{
|
||||
Octstr *final_url = NULL, *body = NULL;
|
||||
Octstr *body = NULL;
|
||||
List *h, *rh = NULL;
|
||||
int status;
|
||||
MmsUaProfile *prof;
|
||||
|
@ -438,7 +438,7 @@ static MmsUaProfile *profile_fetch(Octstr *profile_url)
|
|||
h = http_create_empty_headers();
|
||||
http_header_add(h, "User-Agent", MM_NAME "/" MMSC_VERSION);
|
||||
|
||||
status = http_get_real(HTTP_METHOD_GET, profile_url, h, &final_url, &rh, &body);
|
||||
status = mms_url_fetch_content(HTTP_METHOD_GET, profile_url, h, octstr_imm(""), &rh, &body);
|
||||
if (http_status_class(status) == HTTP_STATUS_SUCCESSFUL) {
|
||||
prof = parse_uaprofile(body);
|
||||
|
||||
|
@ -474,7 +474,6 @@ static MmsUaProfile *profile_fetch(Octstr *profile_url)
|
|||
|
||||
if (h) http_destroy_headers(h);
|
||||
if (rh) http_destroy_headers(rh);
|
||||
if (final_url) octstr_destroy(final_url);
|
||||
|
||||
return prof;
|
||||
}
|
||||
|
|
|
@ -1338,7 +1338,6 @@ static int fetch_url_with_auth(HTTPCaller *c, int method, Octstr *url, List *req
|
|||
octstr_destroy(x);
|
||||
}
|
||||
|
||||
mdbuf[0] = 0;
|
||||
/* from here on, libssl is required. */
|
||||
#ifdef HAVE_LIBSSL
|
||||
if (qop ||
|
||||
|
@ -1351,7 +1350,6 @@ static int fetch_url_with_auth(HTTPCaller *c, int method, Octstr *url, List *req
|
|||
/* Make A1 */
|
||||
x = octstr_format("%S:%S:%S",
|
||||
h->user, realm, h->pass ? h->pass : octstr_imm(""));
|
||||
// memset(mdbuf, 0, sizeof mdbuf);
|
||||
xs = MD5((void *)octstr_get_cstr(x), octstr_len(x), (void *)mdbuf);
|
||||
A1 = octstr_create_from_data((char *)xs, HASHLEN);
|
||||
octstr_destroy(x);
|
||||
|
@ -1359,7 +1357,6 @@ static int fetch_url_with_auth(HTTPCaller *c, int method, Octstr *url, List *req
|
|||
if (algo != NULL && octstr_str_case_compare(algo, "MD5-sess") == 0) {
|
||||
x = octstr_format("%S:%S:%S",
|
||||
A1, nonce, cnonce);
|
||||
// memset(mdbuf, 0, sizeof mdbuf);
|
||||
xs = MD5((void *)octstr_get_cstr(x), octstr_len(x), (void *)mdbuf);
|
||||
octstr_destroy(A1);
|
||||
A1 = octstr_create_from_data((char *)xs, HASHLEN);
|
||||
|
@ -1379,7 +1376,6 @@ static int fetch_url_with_auth(HTTPCaller *c, int method, Octstr *url, List *req
|
|||
Octstr *y;
|
||||
m_qop = "auth-int";
|
||||
|
||||
// memset(mdbuf, 0, sizeof mdbuf);
|
||||
xs = MD5((void *)octstr_get_cstr(body), octstr_len(body), (void *)mdbuf);
|
||||
y = octstr_create_from_data((char *)xs, HASHLEN);
|
||||
octstr_binary_to_hex(y,0);
|
||||
|
@ -1390,7 +1386,7 @@ static int fetch_url_with_auth(HTTPCaller *c, int method, Octstr *url, List *req
|
|||
octstr_destroy(y);
|
||||
} else if (qop)
|
||||
m_qop = "auth";
|
||||
// memset(mdbuf, 0, sizeof mdbuf);
|
||||
|
||||
xs = MD5((void *)octstr_get_cstr(x), octstr_len(x), (void *)mdbuf);
|
||||
A2 = octstr_create_from_data((char *)xs, HASHLEN);
|
||||
octstr_destroy(x);
|
||||
|
@ -1403,7 +1399,7 @@ static int fetch_url_with_auth(HTTPCaller *c, int method, Octstr *url, List *req
|
|||
m_qop, A2);
|
||||
else
|
||||
x = octstr_format("%S:%S:%S", A1, nonce, A2);
|
||||
// memset(mdbuf, 0, sizeof mdbuf);
|
||||
|
||||
xs = MD5((void *)octstr_get_cstr(x), octstr_len(x), (void *)mdbuf);
|
||||
octstr_destroy(x);
|
||||
|
||||
|
@ -1444,6 +1440,7 @@ static int fetch_url_with_auth(HTTPCaller *c, int method, Octstr *url, List *req
|
|||
if (x)
|
||||
octstr_destroy(x);
|
||||
#else
|
||||
mdbuf[0] = 0; /* keep the compiler quiet. */
|
||||
error(0, "Digest authentication requested on url (%s), but SSL not compiled!",
|
||||
octstr_get_cstr(url));
|
||||
#endif
|
||||
|
|
|
@ -83,7 +83,7 @@ static int send_report(Octstr *from, char *report_type, Octstr *status,
|
|||
|
||||
Octstr *url = mms_dlr_url_get(msgid, report_type, mmc_gid);
|
||||
List *rh, *rph = NULL;
|
||||
Octstr *furl = NULL, *rb = NULL;
|
||||
Octstr *rb = NULL;
|
||||
|
||||
if (!url) {
|
||||
info(0, "Sending delivery-report Failed: 'url' is NULL");
|
||||
|
@ -98,10 +98,8 @@ static int send_report(Octstr *from, char *report_type, Octstr *status,
|
|||
http_header_add(rh, "X-Mbuni-MMSC-ID", octstr_get_cstr(mmc_id));
|
||||
http_header_add(rh, "X-Mbuni-From", octstr_get_cstr(from));
|
||||
|
||||
http_get_real(HTTP_METHOD_GET, url, rh, &furl, &rph, &rb);
|
||||
|
||||
if (furl)
|
||||
octstr_destroy(furl);
|
||||
mms_url_fetch_content(HTTP_METHOD_GET, url, rh, octstr_imm(""), &rph, &rb);
|
||||
if (rb)
|
||||
octstr_destroy(rb);
|
||||
octstr_destroy(url);
|
||||
|
|
|
@ -628,7 +628,6 @@ static int mm7eaif_send(MmsVasp *vasp, Octstr *from, Octstr *to, Octstr *msgid,
|
|||
int hstatus = HTTP_OK;
|
||||
List *rh = http_create_empty_headers(), *ph = NULL;
|
||||
Octstr *body = NULL, *rbody = NULL, *url = NULL, *xver;
|
||||
HTTPCaller *caller = http_caller_create();
|
||||
void *xx;
|
||||
char *msgtype;
|
||||
|
||||
|
@ -660,10 +659,9 @@ static int mm7eaif_send(MmsVasp *vasp, Octstr *from, Octstr *to, Octstr *msgid,
|
|||
http_header_add(rh, "Content-Type", "application/vnd.wap.mms-message");
|
||||
|
||||
body = mms_tobinary(m);
|
||||
http_start_request(caller, HTTP_METHOD_POST, vasp->vasp_url, rh, body, 1, NULL, NULL);
|
||||
|
||||
if ((xx = http_receive_result_real(caller, &hstatus, &url, &ph, &rbody,1)) == NULL ||
|
||||
http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
|
||||
hstatus = mms_url_fetch_content(HTTP_METHOD_POST, vasp->vasp_url, rh, body, &ph, &rbody);
|
||||
if (http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
|
||||
*error = octstr_format("Failed to contact VASP[url=%s] => HTTP returned status = %d, id=%s !",
|
||||
octstr_get_cstr(vasp->vasp_url), hstatus, xx ? "Ok" : "not OK");
|
||||
} else
|
||||
|
@ -691,7 +689,6 @@ static int mm7eaif_send(MmsVasp *vasp, Octstr *from, Octstr *to, Octstr *msgid,
|
|||
octstr_destroy(rbody);
|
||||
if (url)
|
||||
octstr_destroy(url);
|
||||
http_caller_destroy(caller);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue