| 214 | |
| 215 | |
| 216 | static inline struct auth_body* auth_body_cloner(char* new_buf, char *org_buf, struct auth_body *auth, char **p) |
| 217 | { |
| 218 | struct auth_body* new_auth; |
| 219 | |
| 220 | new_auth = (struct auth_body*)(void *)(*p); |
| 221 | memcpy(new_auth , auth , sizeof(struct auth_body)); |
| 222 | (*p) += ROUND4(sizeof(struct auth_body)); |
| 223 | |
| 224 | /* authorized field must be cloned elsewhere */ |
| 225 | new_auth->digest.username.whole.s = |
| 226 | translate_pointer(new_buf, org_buf, auth->digest.username.whole.s); |
| 227 | new_auth->digest.username.user.s = |
| 228 | translate_pointer(new_buf, org_buf, auth->digest.username.user.s); |
| 229 | new_auth->digest.username.domain.s = |
| 230 | translate_pointer(new_buf, org_buf, auth->digest.username.domain.s); |
| 231 | new_auth->digest.realm.s = |
| 232 | translate_pointer(new_buf, org_buf, auth->digest.realm.s); |
| 233 | new_auth->digest.nonce.s = |
| 234 | translate_pointer(new_buf, org_buf, auth->digest.nonce.s); |
| 235 | new_auth->digest.uri.s = |
| 236 | translate_pointer(new_buf, org_buf, auth->digest.uri.s); |
| 237 | new_auth->digest.response.s = |
| 238 | translate_pointer(new_buf, org_buf, auth->digest.response.s); |
| 239 | new_auth->digest.alg.alg_str.s = |
| 240 | translate_pointer(new_buf, org_buf, auth->digest.alg.alg_str.s); |
| 241 | new_auth->digest.cnonce.s = |
| 242 | translate_pointer(new_buf, org_buf, auth->digest.cnonce.s); |
| 243 | new_auth->digest.opaque.s = |
| 244 | translate_pointer(new_buf, org_buf, auth->digest.opaque.s); |
| 245 | new_auth->digest.qop.qop_str.s = |
| 246 | translate_pointer(new_buf, org_buf, auth->digest.qop.qop_str.s); |
| 247 | new_auth->digest.nc.s = |
| 248 | translate_pointer(new_buf, org_buf, auth->digest.nc.s); |
| 249 | return new_auth; |
| 250 | } |
| 251 | |
| 252 | |
| 253 | static inline int clone_authorized_hooks(struct sip_msg* new, |