msg_getcontent now returns number of bytes copied.