1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
*** rep/rep_method.c.orig Fri Oct 20 08:34:06 2006
--- rep/rep_method.c Fri Oct 27 12:09:04 2006
***************
*** 526,535 ****
* will allow the client to either perform recovery or
* simply join in.
*/
! if (announce)
(void)__rep_send_message(dbenv,
DB_EID_BROADCAST, REP_NEWCLIENT, NULL, dbt, 0, 0);
! else
(void)__rep_send_message(dbenv,
DB_EID_BROADCAST, REP_ALIVE_REQ, NULL, NULL, 0, 0);
}
--- 526,537 ----
* will allow the client to either perform recovery or
* simply join in.
*/
! if (announce) {
! if ((ret = __dbt_usercopy(dbenv, dbt)) != 0)
! goto err;
(void)__rep_send_message(dbenv,
DB_EID_BROADCAST, REP_NEWCLIENT, NULL, dbt, 0, 0);
! } else
(void)__rep_send_message(dbenv,
DB_EID_BROADCAST, REP_ALIVE_REQ, NULL, NULL, 0, 0);
}
***************
*** 553,558 ****
--- 555,561 ----
}
if (pending_event != DB_EVENT_NO_SUCH_EVENT)
DB_EVENT(dbenv, pending_event, NULL);
+ __dbt_userfree(dbenv, dbt, NULL, NULL);
return (ret);
}
*** rep/rep_record.c.orig Fri Oct 20 08:34:06 2006
--- rep/rep_record.c Mon Nov 13 10:46:29 2006
***************
*** 163,168 ****
--- 163,176 ----
return (EINVAL);
}
+ if ((ret = __dbt_usercopy(dbenv, control)) != 0 ||
+ (ret = __dbt_usercopy(dbenv, rec)) != 0) {
+ __dbt_userfree(dbenv, control, rec, NULL);
+ __db_errx(dbenv,
+ "DB_ENV->rep_process_message: error retrieving DBT contents");
+ return ret;
+ }
+
ret = 0;
db_rep = dbenv->rep_handle;
rep = db_rep->region;
***************
*** 621,626 ****
--- 629,635 ----
*ret_lsnp = rp->lsn;
ret = DB_REP_NOTPERM;
}
+ __dbt_userfree(dbenv, control, rec, NULL);
return (ret);
}
|