Almost working srv+ptr rewrite code.
Compilation error fix.
Added updating of rdlen based on rewritten length (duh).