mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
fix type
This commit is contained in:
@@ -62,7 +62,7 @@ _return_message(struct databuffer *db, struct messagepool *mp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
databuffer_read(struct databuffer *db, struct messagepool *mp, void * buffer, int sz) {
|
databuffer_read(struct databuffer *db, struct messagepool *mp, char * buffer, int sz) {
|
||||||
assert(db->size >= sz);
|
assert(db->size >= sz);
|
||||||
db->size -= sz;
|
db->size -= sz;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|||||||
@@ -175,13 +175,13 @@ _forward(struct gate *g, struct connection * c, int size) {
|
|||||||
}
|
}
|
||||||
if (g->broker) {
|
if (g->broker) {
|
||||||
void * temp = skynet_malloc(size);
|
void * temp = skynet_malloc(size);
|
||||||
databuffer_read(&c->buffer,&g->mp,temp, size);
|
databuffer_read(&c->buffer,&g->mp,(char *)temp, size);
|
||||||
skynet_send(ctx, 0, g->broker, g->client_tag | PTYPE_TAG_DONTCOPY, fd, temp, size);
|
skynet_send(ctx, 0, g->broker, g->client_tag | PTYPE_TAG_DONTCOPY, fd, temp, size);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (c->agent) {
|
if (c->agent) {
|
||||||
void * temp = skynet_malloc(size);
|
void * temp = skynet_malloc(size);
|
||||||
databuffer_read(&c->buffer,&g->mp,temp, size);
|
databuffer_read(&c->buffer,&g->mp,(char *)temp, size);
|
||||||
skynet_send(ctx, c->client, c->agent, g->client_tag | PTYPE_TAG_DONTCOPY, fd , temp, size);
|
skynet_send(ctx, c->client, c->agent, g->client_tag | PTYPE_TAG_DONTCOPY, fd , temp, size);
|
||||||
} else if (g->watchdog) {
|
} else if (g->watchdog) {
|
||||||
char * tmp = skynet_malloc(size + 32);
|
char * tmp = skynet_malloc(size + 32);
|
||||||
|
|||||||
Reference in New Issue
Block a user