From: <cha...@us...> - 2008-08-22 03:32:19
|
Revision: 526 http://sipp.svn.sourceforge.net/sipp/?rev=526&view=rev Author: charlespwright Date: 2008-08-22 03:32:16 +0000 (Fri, 22 Aug 2008) Log Message: ----------- Fix: r524 messed up content-length calculations, correct it. Modified Paths: -------------- sipp/trunk/call.cpp Modified: sipp/trunk/call.cpp =================================================================== --- sipp/trunk/call.cpp 2008-08-22 01:49:41 UTC (rev 525) +++ sipp/trunk/call.cpp 2008-08-22 03:32:16 UTC (rev 526) @@ -2349,10 +2349,11 @@ } /* Need the body for length and auth-int calculation */ char *body; + char *auth_body = NULL; if (length_marker || auth_marker) { body = strstr(msg_buffer, "\r\n\r\n"); if (body) { - body += strlen("\r\n\r\n"); + auth_body += strlen("\r\n\r\n"); } } @@ -2401,8 +2402,8 @@ while(isspace(*tmp) || isdigit(*tmp)) tmp++; sscanf(tmp,"%s", method); - if (!body) { - body = ""; + if (!auth_body) { + auth_body = ""; } /* Determine the type of credentials. */ @@ -2431,7 +2432,7 @@ createSendingMessage(auth_comp->comp_param.auth_param.aka_AMF, -2, my_aka_AMF, sizeof(my_aka_AMF)); createSendingMessage(auth_comp->comp_param.auth_param.aka_OP, -2, my_aka_OP, sizeof(my_aka_OP)); - if (createAuthHeader(my_auth_user, my_auth_pass, method, uri, body, dialog_authentication, + if (createAuthHeader(my_auth_user, my_auth_pass, method, uri, auth_body, dialog_authentication, my_aka_OP, my_aka_AMF, my_aka_K, result + authlen) == 0) { ERROR("%s", result + authlen); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |