RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: db-4_5_20: db/rep/ rep_method.c rep_record.c

From: Elan Ruusamäe <glen@rpm5.org>
Date: Wed 03 Sep 2008 - 05:15:57 CEST
Message-Id: <20080903031557.7B69B516A@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Elan Ruusamäe
  Root:   /v/rpm/cvs                       Email:  glen@rpm5.org
  Module: db                               Date:   03-Sep-2008 05:15:57
  Branch: db-4_5_20                        Handle: 2008090303155700

  Modified files:           (Branch: db-4_5_20)
    db/rep                  rep_method.c rep_record.c

  Log:
    - apply upstream patch.4.5.20.2

  Summary:
    Revision    Changes     Path
    1.11.4.1    +5  -2      db/rep/rep_method.c
    1.12.4.1    +9  -0      db/rep/rep_record.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: db/rep/rep_method.c
  ============================================================================
  $ cvs diff -u -r1.11 -r1.11.4.1 rep_method.c
  --- db/rep/rep_method.c	1 Oct 2006 20:19:35 -0000	1.11
  +++ db/rep/rep_method.c	3 Sep 2008 03:15:57 -0000	1.11.4.1
  @@ -526,10 +526,12 @@
   		 * will allow the client to either perform recovery or
   		 * simply join in.
   		 */
  -		if (announce)
  +		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
  +		} else
   			(void)__rep_send_message(dbenv,
   			    DB_EID_BROADCAST, REP_ALIVE_REQ, NULL, NULL, 0, 0);
   	}
  @@ -553,6 +555,7 @@
   	}
   	if (pending_event != DB_EVENT_NO_SUCH_EVENT)
   		DB_EVENT(dbenv, pending_event, NULL);
  +	__dbt_userfree(dbenv, dbt, NULL, NULL);
   	return (ret);
   }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: db/rep/rep_record.c
  ============================================================================
  $ cvs diff -u -r1.12 -r1.12.4.1 rep_record.c
  --- db/rep/rep_record.c	1 Oct 2006 20:19:35 -0000	1.12
  +++ db/rep/rep_record.c	3 Sep 2008 03:15:57 -0000	1.12.4.1
  @@ -163,6 +163,14 @@
   		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,6 +629,7 @@
   			*ret_lsnp = rp->lsn;
   		ret = DB_REP_NOTPERM;
   	}
  +	__dbt_userfree(dbenv, control, rec, NULL);
   	return (ret);
   }
   
  @@ .
Received on Wed Sep 3 05:15:57 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.