use skynet_error for log

This commit is contained in:
云风
2013-12-18 12:25:58 +08:00
parent bb20628ebe
commit 5ccb666a8b
5 changed files with 15 additions and 5 deletions

View File

@@ -41,6 +41,8 @@ _cb(struct skynet_context * context, void * ud, int type, int session, uint32_t
int
client_init(struct client *c, struct skynet_context *ctx, const char * args) {
int id = 0;
if (args == NULL)
return 1;
sscanf(args, "%d",&id);
c->id = id;
skynet_callback(ctx, c, _cb);

View File

@@ -330,6 +330,8 @@ start_listen(struct gate *g, char * listen_addr) {
int
gate_init(struct gate *g , struct skynet_context * ctx, char * parm) {
if (parm == NULL)
return 1;
int max = 0;
int buffer = 0;
int sz = strlen(parm)+1;