cloudwu/skynet — pull request #176 by linan0827 (2014-10-11 19:34:35+00:00)
Title: fix a minor bug when unpacking string from skynet_socket_message

Size of a skynet_socket_message, when padded is sizeof(skynet_socket_message) + strlen(result->data) + 1, which includes the trailing '\0'.

When unpacking this string from the message, this "1" should be subtracted.

You can observe this issue by triggering a padded socket message. For example an ACCEPT message. By running examples/config file. In cmaster.lua, when there is socket connected, this log will be displayed:
skynet.error("connect from " .. addr .. " " .. id)

In current version you will get this:
[:01000004] connect from 127.0.0.1:58437
which doesn't show id in the end.

Correct log should be:
[:01000004] connect from 127.0.0.1:58455 4