Lines 1-5
Link Here
|
1 |
--- ariruby.c.orig Fri Apr 29 09:23:11 2011 |
1 |
--- ariruby.c.orig 2011-04-27 21:34:36.000000000 -0400 |
2 |
+++ ariruby.c Fri Apr 29 09:24:14 2011 |
2 |
+++ ariruby.c 2011-07-24 21:50:51.119557755 -0400 |
|
|
3 |
@@ -189,7 +189,7 @@ |
4 |
static VALUE |
5 |
ariprint(VALUE self, VALUE outbuf) |
6 |
{ |
7 |
- fprintf(stdout, "%s", RSTRING(outbuf)->ptr); |
8 |
+ fprintf(stdout, "%s", RSTRING_PTR(outbuf)); |
9 |
|
10 |
return self; |
11 |
} |
12 |
@@ -198,14 +198,14 @@ |
13 |
arisend(VALUE self, VALUE data) |
14 |
{ |
15 |
int len; |
16 |
- len = RSTRING(data)->len; |
17 |
+ len = RSTRING_LEN(data); |
18 |
|
19 |
if ((sendbuf = (char *)malloc(len + 1)) == NULL) { |
20 |
perror("arisend malloc failed"); |
21 |
close(sock); |
22 |
exit(0); |
23 |
} |
24 |
- memcpy(sendbuf, RSTRING(data)->ptr, len); |
25 |
+ memcpy(sendbuf, RSTRING_PTR(data), len); |
26 |
|
27 |
if (len == 0) { |
28 |
fprintf(stderr, "please set a data in arisend function \n"); |
3 |
@@ -519,9 +519,6 @@ |
29 |
@@ -519,9 +519,6 @@ |
4 |
if (sendbuf != NULL) |
30 |
if (sendbuf != NULL) |
5 |
free(sendbuf); |
31 |
free(sendbuf); |
Lines 10-22
Link Here
|
10 |
if (nb == -1 || nb == -2) { |
36 |
if (nb == -1 || nb == -2) { |
11 |
#if !(defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)) |
37 |
#if !(defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)) |
12 |
alarm(0); |
38 |
alarm(0); |
13 |
@@ -543,6 +540,9 @@ |
39 |
@@ -544,6 +541,9 @@ |
14 |
if (!pflags) |
|
|
15 |
exit(0); |
40 |
exit(0); |
16 |
} |
41 |
} |
17 |
+ |
42 |
|
18 |
+ if (headbuf != NULL) |
43 |
+ if (headbuf != NULL) |
19 |
+ free(headbuf); |
44 |
+ free(headbuf); |
20 |
|
45 |
+ |
21 |
if (sslflags) |
46 |
if (sslflags) |
22 |
ssl_free(ctx, ssl); |
47 |
ssl_free(ctx, ssl); |
|
|
48 |
|