本文整理汇总了C++中putErrmsg函数的典型用法代码示例。如果您正苦于以下问题:C++ putErrmsg函数的具体用法?C++ putErrmsg怎么用?C++ putErrmsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了putErrmsg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: dtn2_destroyDirective
void dtn2_destroyDirective(FwdDirective *directive)
{
Sdr sdr = getIonsdr();
CHKVOID(directive);
if (directive->action == fwd)
{
CHKVOID(sdr_begin_xn(sdr));
sdr_free(sdr, directive->eid);
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Can't destroy directive EID.", NULL);
}
return;
}
if (directive->action == xmit)
{
if (directive->destDuctName)
{
CHKVOID(sdr_begin_xn(sdr));
sdr_free(sdr, directive->destDuctName);
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Can't destroy destDuctName.", NULL);
}
}
}
}
开发者ID:brnrc,项目名称:ion-dtn,代码行数:31,代码来源:libdtn2fw.c
示例2: manageMtusize
static void manageMtusize(int tokenCount, char **tokens)
{
Sdr sdr = getIonsdr();
Object cfdpdbObj = getCfdpDbObject();
CfdpDB cfdpdb;
int newMtusize;
if (tokenCount != 3)
{
SYNTAX_ERROR;
}
newMtusize = atoi(tokens[2]);
if (newMtusize < 0)
{
putErrmsg("mtuSize invalid.", tokens[2]);
return;
}
sdr_begin_xn(sdr);
sdr_stage(sdr, (char *) &cfdpdb, cfdpdbObj, sizeof(CfdpDB));
cfdpdb.mtuSize = newMtusize;
sdr_write(sdr, cfdpdbObj, (char *) &cfdpdb, sizeof(CfdpDB));
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Can't change mtuSize.", NULL);
}
}
开发者ID:b,项目名称:ION,代码行数:28,代码来源:cfdpadmin.c
示例3: ionDropVdb
void ionDropVdb()
{
PsmPartition wm = getIonwm();
char *ionvdbName = _ionvdbName();
PsmAddress vdbAddress;
PsmAddress elt;
char *stop = NULL;
if (psm_locate(wm, ionvdbName, &vdbAddress, &elt) < 0)
{
putErrmsg("Failed searching for vdb.", NULL);
return;
}
if (elt)
{
dropVdb(wm, vdbAddress); /* Destroy Vdb. */
psm_free(wm, vdbAddress);
if (psm_uncatlg(wm, ionvdbName) < 0)
{
putErrmsg("Failed uncataloging vdb.", NULL);
}
}
oK(_ionvdb(&stop)); /* Forget old Vdb. */
}
开发者ID:pantuza,项目名称:pleiades-DTN,代码行数:26,代码来源:ion.c
示例4: Sm_list_create
PsmAddress Sm_list_create(const char *fileName, int lineNbr,
PsmPartition partition)
{
sm_SemId lock;
PsmAddress list;
SmList *listBuffer;
lock = sm_SemCreate(SM_NO_KEY, SM_SEM_FIFO);
if (lock < 0)
{
putErrmsg("Can't create semaphore for list.", NULL);
return 0;
}
list = Psm_zalloc(fileName, lineNbr, partition, sizeof(SmList));
if (list == 0)
{
sm_SemDelete(lock);
putErrmsg("Can't allocate space for list header.", NULL);
return 0;
}
listBuffer = (SmList *) psp(partition, list);
eraseList(listBuffer);
listBuffer->lock = lock;
return list;
}
开发者ID:brnrc,项目名称:ion-dtn,代码行数:27,代码来源:smlist.c
示例5: udpComputeCsepName
static int udpComputeCsepName(char *endpointSpec, char *endpointName)
{
unsigned short portNbr;
unsigned int ipAddress;
char hostName[MAXHOSTNAMELEN + 1];
if (endpointName == NULL)
{
putErrmsg(BadParmsMemo, NULL);
return -1;
}
parseSocketSpec(endpointSpec, &portNbr, &ipAddress);
if (portNbr == 0)
{
portNbr = 2357; /* Default. */
}
if (ipAddress == 0) /* Default to local host. */
{
getNameOfHost(hostName, sizeof hostName);
ipAddress = getInternetAddress(hostName);
}
else
{
if (getInternetHostName(ipAddress, hostName) == NULL)
{
putErrmsg("Unknown host in endpoint.", endpointSpec);
return -1;
}
}
isprintf(endpointName, MAX_EP_NAME + 1, "%s:%hu", hostName, portNbr);
return 0;
}
开发者ID:b,项目名称:ION,代码行数:35,代码来源:udpts.c
示例6: manageDiscard
static void manageDiscard(int tokenCount, char **tokens)
{
Sdr sdr = getIonsdr();
Object cfdpdbObj = getCfdpDbObject();
CfdpDB cfdpdb;
int newDiscard;
if (tokenCount != 3)
{
SYNTAX_ERROR;
}
newDiscard = atoi(tokens[2]);
if (newDiscard != 0 && newDiscard != 1)
{
putErrmsg("discardIncompleteFile switch invalid.", tokens[2]);
return;
}
sdr_begin_xn(sdr);
sdr_stage(sdr, (char *) &cfdpdb, cfdpdbObj, sizeof(CfdpDB));
cfdpdb.discardIncompleteFile = newDiscard;
sdr_write(sdr, cfdpdbObj, (char *) &cfdpdb, sizeof(CfdpDB));
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Can't change discardIncompleteFile switch.", NULL);
}
}
开发者ID:b,项目名称:ION,代码行数:28,代码来源:cfdpadmin.c
示例7: manageMaxtrnbr
static void manageMaxtrnbr(int tokenCount, char **tokens)
{
Sdr sdr = getIonsdr();
Object cfdpdbObj = getCfdpDbObject();
CfdpDB cfdpdb;
int newMaxtrnbr;
if (tokenCount != 3)
{
SYNTAX_ERROR;
}
newMaxtrnbr = atoi(tokens[2]);
if (newMaxtrnbr < 0)
{
putErrmsg("maxTransactionNbr invalid.", tokens[2]);
return;
}
sdr_begin_xn(sdr);
sdr_stage(sdr, (char *) &cfdpdb, cfdpdbObj, sizeof(CfdpDB));
cfdpdb.maxTransactionNbr = newMaxtrnbr;
sdr_write(sdr, cfdpdbObj, (char *) &cfdpdb, sizeof(CfdpDB));
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Can't change maxTransactionNbr.", NULL);
}
}
开发者ID:b,项目名称:ION,代码行数:28,代码来源:cfdpadmin.c
示例8: manageFillchar
static void manageFillchar(int tokenCount, char **tokens)
{
Sdr sdr = getIonsdr();
Object cfdpdbObj = getCfdpDbObject();
CfdpDB cfdpdb;
int newFillchar;
char *trailing;
if (tokenCount != 3)
{
SYNTAX_ERROR;
}
newFillchar = strtol(tokens[2], &trailing, 16);
if (*trailing != '\0')
{
putErrmsg("fillCharacter invalid.", tokens[2]);
return;
}
sdr_begin_xn(sdr);
sdr_stage(sdr, (char *) &cfdpdb, cfdpdbObj, sizeof(CfdpDB));
cfdpdb.fillCharacter = newFillchar;
sdr_write(sdr, cfdpdbObj, (char *) &cfdpdb, sizeof(CfdpDB));
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Can't change fillCharacter.", NULL);
}
}
开发者ID:b,项目名称:ION,代码行数:29,代码来源:cfdpadmin.c
示例9: manageMaxtimeouts
static void manageMaxtimeouts(int tokenCount, char **tokens)
{
Sdr sdr = getIonsdr();
Object cfdpdbObj = getCfdpDbObject();
CfdpDB cfdpdb;
int newMaxtimeouts;
if (tokenCount != 3)
{
SYNTAX_ERROR;
}
newMaxtimeouts = atoi(tokens[2]);
if (newMaxtimeouts < 0)
{
putErrmsg("checkTimeoutLimit invalid.", tokens[2]);
return;
}
sdr_begin_xn(sdr);
sdr_stage(sdr, (char *) &cfdpdb, cfdpdbObj, sizeof(CfdpDB));
cfdpdb.checkTimeoutLimit = newMaxtimeouts;
sdr_write(sdr, cfdpdbObj, (char *) &cfdpdb, sizeof(CfdpDB));
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Can't change checkTimerPeriod.", NULL);
}
}
开发者ID:b,项目名称:ION,代码行数:28,代码来源:cfdpadmin.c
示例10: acquireBundles
static int acquireBundles(AcqWorkArea *work, Object zco,
unsigned long senderEngineNbr)
{
char engineNbrString[21];
char senderEidBuffer[SDRSTRING_BUFSZ];
char *senderEid;
isprintf(engineNbrString, sizeof engineNbrString, "%lu",
senderEngineNbr);
senderEid = senderEidBuffer;
getSenderEid(&senderEid, engineNbrString);
if (bpBeginAcq(work, 0, senderEid) < 0)
{
putErrmsg("Can't begin acquisition of bundle(s).", NULL);
return -1;
}
if (bpLoadAcq(work, zco) < 0)
{
putErrmsg("Can't continue bundle acquisition.", NULL);
return -1;
}
if (bpEndAcq(work) < 0)
{
putErrmsg("Can't end acquisition of bundle(s).", NULL);
return -1;
}
return 0;
}
开发者ID:b,项目名称:ION,代码行数:31,代码来源:ltpcli.c
示例11: manageRequirecrc
static void manageRequirecrc(int tokenCount, char **tokens)
{
Sdr sdr = getIonsdr();
Object cfdpdbObj = getCfdpDbObject();
CfdpDB cfdpdb;
int newRequirecrc;
if (tokenCount != 3)
{
SYNTAX_ERROR;
}
newRequirecrc = atoi(tokens[2]);
if (newRequirecrc != 0 && newRequirecrc != 1)
{
putErrmsg("crcRequired switch invalid.", tokens[2]);
return;
}
sdr_begin_xn(sdr);
sdr_stage(sdr, (char *) &cfdpdb, cfdpdbObj, sizeof(CfdpDB));
cfdpdb.crcRequired = newRequirecrc;
sdr_write(sdr, cfdpdbObj, (char *) &cfdpdb, sizeof(CfdpDB));
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Can't change crcRequired switch.", NULL);
}
}
开发者ID:b,项目名称:ION,代码行数:28,代码来源:cfdpadmin.c
示例12: Sm_list_insert_after
PsmAddress Sm_list_insert_after(const char *fileName, int lineNbr,
PsmPartition partition, PsmAddress oldElt,
PsmAddress data)
{
SmListElt *oldEltBuffer;
PsmAddress list;
SmList *listBuffer;
CHKZERO(partition);
CHKZERO(oldElt);
oldEltBuffer = (SmListElt *) psp(partition, oldElt);
CHKZERO(oldEltBuffer);
if ((list = oldEltBuffer->list) == 0)
{
putErrmsg(_noListMsg(), NULL);
return 0;
}
listBuffer = (SmList *) psp(partition, list);
if (lockSmlist(listBuffer) == ERROR)
{
putErrmsg(_cannotLockMsg(), NULL);
return 0;
}
return finishInsertingAfter(fileName, lineNbr, partition, oldElt,
oldEltBuffer, list, listBuffer, data);
}
开发者ID:brnrc,项目名称:ion-dtn,代码行数:28,代码来源:smlist.c
示例13: reforwardStrandedBundles
static int reforwardStrandedBundles()
{
Sdr sdr = getIonsdr();
BpDB *bpConstants = getBpConstants();
Object elt;
Object nextElt;
CHKERR(sdr_begin_xn(sdr));
for (elt = sdr_list_first(sdr, bpConstants->limboQueue); elt;
elt = nextElt)
{
nextElt = sdr_list_next(sdr, elt);
if (releaseFromLimbo(elt, 0) < 0)
{
putErrmsg("Failed releasing bundle from limbo.", NULL);
sdr_cancel_xn(sdr);
return -1;
}
}
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("brss failed limbo release on client connect.", NULL);
return -1;
}
return 0;
}
开发者ID:brnrc,项目名称:ion-dtn,代码行数:28,代码来源:brsscla.c
示例14: getIonwm
IonNode *addNode(IonVdb *ionvdb, uvast nodeNbr)
{
PsmPartition ionwm = getIonwm();
PsmAddress addr;
PsmAddress elt;
IonNode *node;
addr = psm_zalloc(ionwm, sizeof(IonNode));
if (addr == 0)
{
putErrmsg("Can't add node.", NULL);
return NULL;
}
node = (IonNode *) psp(ionwm, addr);
CHKNULL(node);
memset((char *) node, 0, sizeof(IonNode));
node->nodeNbr = nodeNbr;
elt = sm_rbt_insert(ionwm, ionvdb->nodes, addr, rfx_order_nodes, node);
if (elt == 0)
{
psm_free(ionwm, addr);
putErrmsg("Can't add node.", NULL);
return NULL;
}
node->embargoes = sm_list_create(ionwm);
return node;
}
开发者ID:michirod,项目名称:cgr-jni,代码行数:29,代码来源:rfx.c
示例15: Sm_rbt_create
PsmAddress Sm_rbt_create(char *file, int line, PsmPartition partition)
{
sm_SemId lock;
PsmAddress rbt;
SmRbt *rbtPtr;
lock = sm_SemCreate(SM_NO_KEY, SM_SEM_FIFO);
if (lock < 0)
{
putErrmsg("Can't create semaphore for rbt.", NULL);
return 0;
}
rbt = Psm_zalloc(file, line, partition, sizeof(SmRbt));
if (rbt == 0)
{
sm_SemDelete(lock);
putErrmsg("Can't allocate space for rbt object.", NULL);
return 0;
}
rbtPtr = (SmRbt *) psp(partition, rbt);
eraseTree(rbtPtr);
rbtPtr->lock = lock;
return rbt;
}
开发者ID:NASAHackTO,项目名称:ion-dtn,代码行数:26,代码来源:smrbt.c
示例16: Sm_list_insert_before
PsmAddress Sm_list_insert_before(const char *fileName, int lineNbr,
PsmPartition partition, PsmAddress oldElt,
PsmAddress data)
{
SmListElt *oldEltBuffer;
PsmAddress list;
SmList *listBuffer;
PsmAddress elt;
SmListElt *eltBuffer;
CHKZERO(partition);
CHKZERO(oldElt);
oldEltBuffer = (SmListElt *) psp(partition, oldElt);
CHKZERO(oldEltBuffer);
if ((list = oldEltBuffer->list) == 0)
{
putErrmsg(_noListMsg(), NULL);
return 0;
}
listBuffer = (SmList *) psp(partition, list);
if (lockSmlist(listBuffer) == ERROR)
{
putErrmsg(_cannotLockMsg(), NULL);
return 0;
}
elt = Psm_zalloc(fileName, lineNbr, partition, sizeof(SmListElt));
if (elt == 0)
{
unlockSmlist(listBuffer);
putErrmsg(_noSpaceForEltMsg(), NULL);
return 0;
}
eltBuffer = (SmListElt *) psp(partition, elt);
eraseListElt(eltBuffer);
eltBuffer->list = list;
eltBuffer->data = data;
eltBuffer->prev = oldEltBuffer->prev;
eltBuffer->next = oldElt;
if (oldEltBuffer->prev != 0)
{
eltBuffer = (SmListElt *) psp(partition, oldEltBuffer->prev);
CHKZERO(eltBuffer);
eltBuffer->next = elt;
}
else
{
listBuffer->first = elt;
}
oldEltBuffer->prev = elt;
listBuffer->length += 1;
unlockSmlist(listBuffer);
return elt;
}
开发者ID:brnrc,项目名称:ion-dtn,代码行数:57,代码来源:smlist.c
示例17: getAcssdr
Sdr getAcssdr(void)
{
static int haveTriedAcsSdr = 0;
if(acsSdr || haveTriedAcsSdr)
{
return acsSdr;
}
if (ionAttach() < 0)
{
putErrmsg("Can't attach to ION.", NULL);
return NULL;
}
haveTriedAcsSdr = 1;
acsSdr = sdr_start_using(acssdrName);
if (acsSdr == NULL)
{
//Can't start using SDR for ACS.
return NULL;
}
return acsSdr;
}
开发者ID:NASAHackTO,项目名称:ion-dtn,代码行数:26,代码来源:acstx.c
示例18: run_sdatest
static int run_sdatest(uvast destEngineId)
{
SenderThreadParms parms;
pthread_t senderThread;
isignal(SIGTERM, interruptThread);
if (destEngineId)
{
/* Must start sender thread. */
parms.destEngineId = destEngineId;
parms.running = 1;
if (pthread_begin(&senderThread, NULL, sendItems, &parms))
{
putSysErrmsg("sdatest can't create send thread", NULL);
return 1;
}
}
if (sda_run(getLengthOfItem, handleItem) < 0)
{
putErrmsg("sdatest sda_run failed.", NULL);
}
if (destEngineId)
{
parms.running = 0;
pthread_join(senderThread, NULL);
}
writeErrmsgMemos();
writeMemo("[i] sdatest main thread has ended.");
ionDetach();
return 0;
}
开发者ID:brnrc,项目名称:ion-dtn,代码行数:35,代码来源:sdatest.c
示例19: bp_release_delivery
void bp_release_delivery(BpDelivery *dlvBuffer, int releasePayload)
{
Sdr sdr = getIonsdr();
CHKVOID(dlvBuffer);
if (dlvBuffer->result == BpPayloadPresent)
{
if (dlvBuffer->bundleSourceEid)
{
MRELEASE(dlvBuffer->bundleSourceEid);
dlvBuffer->bundleSourceEid = NULL;
}
if (releasePayload)
{
if (dlvBuffer->adu)
{
sdr_begin_xn(sdr);
zco_destroy_reference(sdr, dlvBuffer->adu);
if (sdr_end_xn(sdr) < 0)
{
putErrmsg("Failed releasing delivery.",
NULL);
}
dlvBuffer->adu = 0;
}
}
}
}
开发者ID:b,项目名称:ION,代码行数:30,代码来源:libbp.c
示例20: sm_rbt_last
PsmAddress sm_rbt_last(PsmPartition partition, PsmAddress rbt)
{
SmRbt *rbtPtr;
PsmAddress node;
PsmAddress last = 0;
SmRbtNode *nodePtr;
CHKZERO(partition);
CHKZERO(rbt);
rbtPtr = (SmRbt *) psp(partition, rbt);
CHKZERO(rbtPtr);
if (lockSmrbt(rbtPtr) == ERROR)
{
return 0;
}
node = rbtPtr->root;
while (node)
{
last = node;
nodePtr = (SmRbtNode *) psp(partition, node);
if (nodePtr == NULL)
{
putErrmsg("Corrupt red-black tree.", NULL);
last = 0;
break;
}
node = nodePtr->child[RIGHT];
}
unlockSmrbt(rbtPtr);
return last;
}
开发者ID:NASAHackTO,项目名称:ion-dtn,代码行数:34,代码来源:smrbt.c
注:本文中的putErrmsg函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论