version 1.20, 2012/05/21 18:27:42 |
version 1.21, 2012/07/10 11:53:01 |
|
|
buffer = args_strtonum(args, 'b', 0, INT_MAX, &cause); |
buffer = args_strtonum(args, 'b', 0, INT_MAX, &cause); |
if (cause != NULL) { |
if (cause != NULL) { |
ctx->error(ctx, "buffer %s", cause); |
ctx->error(ctx, "buffer %s", cause); |
xfree(cause); |
free(cause); |
return (-1); |
return (-1); |
} |
} |
} |
} |
|
|
buffer_ptr, &cause); |
buffer_ptr, &cause); |
if (error != 0) { |
if (error != 0) { |
ctx->error(ctx, "%s: %s", path, cause); |
ctx->error(ctx, "%s: %s", path, cause); |
xfree(cause); |
free(cause); |
return (-1); |
return (-1); |
} |
} |
return (1); |
return (1); |
|
|
} |
} |
if (paste_replace(&global_buffers, buffer, pdata, psize) != 0) { |
if (paste_replace(&global_buffers, buffer, pdata, psize) != 0) { |
ctx->error(ctx, "no buffer %d", buffer); |
ctx->error(ctx, "no buffer %d", buffer); |
xfree(pdata); |
free(pdata); |
return (-1); |
return (-1); |
} |
} |
|
|
return (0); |
return (0); |
|
|
error: |
error: |
if (pdata != NULL) |
free(pdata); |
xfree(pdata); |
|
if (f != NULL) |
if (f != NULL) |
fclose(f); |
fclose(f); |
return (-1); |
return (-1); |
|
|
|
|
psize = EVBUFFER_LENGTH(c->stdin_data); |
psize = EVBUFFER_LENGTH(c->stdin_data); |
if (psize == 0 || (pdata = malloc(psize + 1)) == NULL) { |
if (psize == 0 || (pdata = malloc(psize + 1)) == NULL) { |
xfree(data); |
free(data); |
return; |
return; |
} |
} |
memcpy(pdata, EVBUFFER_DATA(c->stdin_data), psize); |
memcpy(pdata, EVBUFFER_DATA(c->stdin_data), psize); |
|
|
server_push_stderr(c); |
server_push_stderr(c); |
} |
} |
|
|
xfree(data); |
free(data); |
} |
} |