summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication/repl_extop.c
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2008-10-17 22:12:48 +0000
committerNathan Kinder <nkinder@redhat.com>2008-10-17 22:12:48 +0000
commit567be2b6589e5fa3e11bb103f046bec55f37dd6b (patch)
tree5c276c4fb82c4a010597898a4375556c92529249 /ldap/servers/plugins/replication/repl_extop.c
parent6b1364ff27b4a9499089f76938fcd82da9e70baf (diff)
Related: 207457
Summary: Add support for 64-bit counters (phase 1).
Diffstat (limited to 'ldap/servers/plugins/replication/repl_extop.c')
-rw-r--r--ldap/servers/plugins/replication/repl_extop.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/ldap/servers/plugins/replication/repl_extop.c b/ldap/servers/plugins/replication/repl_extop.c
index 0cdba759..b286f209 100644
--- a/ldap/servers/plugins/replication/repl_extop.c
+++ b/ldap/servers/plugins/replication/repl_extop.c
@@ -562,7 +562,8 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
char *bind_dn = NULL;
Object *ruv_object = NULL;
RUV *supplier_ruv = NULL;
- int connid, opid;
+ PRUint64 connid = 0;
+ int opid = 0;
PRBool isInc = PR_FALSE; /* true if incremental update */
char *locking_purl = NULL; /* the supplier contacting us */
char *current_purl = NULL; /* the supplier which already has exclusive access */
@@ -581,9 +582,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
goto send_response;
}
- connid = 0;
slapi_pblock_get(pb, SLAPI_CONN_ID, &connid);
- opid = 0;
slapi_pblock_get(pb, SLAPI_OPERATION_ID, &opid);
/*
@@ -606,7 +605,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
/* Stash info that this is an incremental update session */
connext->repl_protocol_version = REPL_PROTOCOL_50_INCREMENTAL;
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
- "conn=%d op=%d repl=\"%s\": Begin incremental protocol\n",
+ "conn=%" PRIu64 " op=%d repl=\"%s\": Begin incremental protocol\n",
connid, opid, repl_root);
isInc = PR_TRUE;
}
@@ -618,7 +617,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
connext->repl_protocol_version = REPL_PROTOCOL_50_TOTALUPDATE;
}
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
- "conn=%d op=%d repl=\"%s\": Begin total protocol\n",
+ "conn=%" PRIu64 " op=%d repl=\"%s\": Begin total protocol\n",
connid, opid, repl_root);
isInc = PR_FALSE;
}
@@ -627,7 +626,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
/* Stash info that this is an incremental update session */
connext->repl_protocol_version = REPL_PROTOCOL_50_INCREMENTAL;
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
- "conn=%d op=%d repl=\"%s\": Begin 7.1 incremental protocol\n",
+ "conn=%" PRIu64 " op=%d repl=\"%s\": Begin 7.1 incremental protocol\n",
connid, opid, repl_root);
isInc = PR_TRUE;
}
@@ -639,7 +638,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
connext->repl_protocol_version = REPL_PROTOCOL_71_TOTALUPDATE;
}
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
- "conn=%d op=%d repl=\"%s\": Begin 7.1 total protocol\n",
+ "conn=%" PRIu64 " op=%d repl=\"%s\": Begin 7.1 total protocol\n",
connid, opid, repl_root);
isInc = PR_FALSE;
}
@@ -661,7 +660,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
if (replica_is_being_configured(repl_root))
{
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
- "conn=%d op=%d replica=\"%s\": "
+ "conn=%" PRIu64 " op=%d replica=\"%s\": "
"Replica is being configured: try again later\n",
connid, opid, repl_root);
response = NSDS50_REPL_REPLICA_BUSY;
@@ -714,7 +713,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
{
response = NSDS50_REPL_EXCESSIVE_CLOCK_SKEW;
slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
- "conn=%d op=%d repl=\"%s\": "
+ "conn=%" PRIu64 " op=%d repl=\"%s\": "
"Excessive clock skew from supplier RUV\n",
connid, opid, repl_root);
goto send_response;
@@ -750,7 +749,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
if (check_replica_id_uniqueness(replica, supplier_ruv) != 0){
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
- "conn=%d op=%d repl=\"%s\": "
+ "conn=%" PRIu64 " op=%d repl=\"%s\": "
"Replica has same replicaID %d as supplier\n",
connid, opid, repl_root, replica_get_rid(replica));
response = NSDS50_REPL_REPLICAID_ERROR;
@@ -763,7 +762,7 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
* the session's conn id and op id to identify the the supplier.
*/
/* junkrc = ruv_get_first_id_and_purl(supplier_ruv, &junkrid, &locking_purl); */
- PR_snprintf(locking_session, sizeof(locking_session), "conn=%d id=%d", connid, opid);
+ PR_snprintf(locking_session, sizeof(locking_session), "conn=%" PRIu64 " id=%d", connid, opid);
locking_purl = &locking_session[0];
if (replica_get_exclusive_access(replica, &isInc, connid, opid,
locking_purl,
@@ -877,7 +876,7 @@ send_response:
}
slapi_log_error (resp_log_level, repl_plugin_name,
- "conn=%d op=%d replica=\"%s\": "
+ "conn=%" PRIu64 " op=%d replica=\"%s\": "
"Unable to acquire replica: error: %s%s\n",
connid, opid,
(replica ? slapi_sdn_get_dn(replica_get_root(replica)) : "unknown"),
@@ -901,7 +900,7 @@ send_response:
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_OID, REPL_NSDS50_REPLICATION_RESPONSE_OID);
slapi_pblock_set(pb, SLAPI_EXT_OP_RET_VALUE, resp_bval);
slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
- "conn=%d op=%d repl=\"%s\": "
+ "conn=%" PRIu64 " op=%d repl=\"%s\": "
"StartNSDS50ReplicationRequest: response=%d rc=%d\n",
connid, opid, repl_root,
response, rc);
@@ -1008,7 +1007,8 @@ multimaster_extop_EndNSDS50ReplicationRequest(Slapi_PBlock *pb)
ber_int_t response;
void *conn;
consumer_connection_extension *connext = NULL;
- int connid=-1, opid=-1;
+ PRUint64 connid = 0;
+ int opid=-1;
/* Decode the extended operation */
if (decode_endrepl_extop(pb, &repl_root) == -1)