add debug_console service

This commit is contained in:
云风
2014-02-25 20:04:50 +08:00
parent 486da653e4
commit 0505b88f5e
5 changed files with 117 additions and 18 deletions

View File

@@ -594,10 +594,10 @@ _filter_args(struct skynet_context * context, int type, int *session, void ** da
}
if (needcopy && *data) {
char * msg = malloc(*sz+1);
char * msg = malloc(*sz+1);
memcpy(msg, *data, *sz);
msg[*sz] = '\0';
*data = msg;
*data = msg;
}
assert((*sz & HANDLE_MASK) == *sz);
@@ -630,7 +630,7 @@ skynet_send(struct skynet_context * context, uint32_t source, uint32_t destinati
if (skynet_context_push(destination, &smsg)) {
free(data);
skynet_error(NULL, "Drop message from %x to %x (type=%d)(size=%d)", source, destination, type, (int)(sz & HANDLE_MASK));
skynet_error(NULL, "Drop message from %x to %x (type=%d)(size=%d)", source, destination, type&0xff, (int)(sz & HANDLE_MASK));
return -1;
}
}