38 if( bundlemem ==
NULL ) {
39 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_ERR,
"invalid MMEM pointer");
44 if( bundle ==
NULL ) {
45 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_ERR,
"invalid bundle");
58 if(n->app_id == bundle->dst_srv) {
59 if(n->status == APP_ACTIVE) {
61 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_DBG,
"unblocking service");
69 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_ERR,
"No Service found to unblock");
83 if( bundlemem ==
NULL ) {
84 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_ERR,
"invalid MMEM pointer");
85 return DELIVERY_STATE_ERROR;
89 if( bundle ==
NULL ) {
90 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_ERR,
"invalid bundle");
92 return DELIVERY_STATE_ERROR;
100 if(n->app_id == bundle->dst_srv &&
101 n->node_id == bundle->dst_node ) {
102 if(n->status == APP_ACTIVE) {
104 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_DBG,
"Service found, delivering...");
120 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_DBG,
"Service is busy");
124 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_DBG,
"Service is inactive");
128 if( !delivered && busy ) {
132 return DELIVERY_STATE_BUSY;
140 return DELIVERY_STATE_ERROR;
147 if (bundle->flags & BUNDLE_FLAG_CUST_REQ) {
148 CUSTODY.report(bundlemem, 128);
152 if( bundle->flags & BUNDLE_FLAG_REP_DELIV ) {
158 time -= bundle->debug_time;
159 LOG(LOGD_DTN, LOG_BUNDLE, LOGL_DBG,
"time needed to process bundle for Delivery: %i", time);
162 return DELIVERY_STATE_WAIT_FOR_APP;