LINK_DATA *csfnet_server_get_link(CSFNET_SERVER * server, UINT16 bus_type, UINT16 link_id) { LINK_DATA *link; LINK_KEY key; key.bus_type = bus_type; key.link_id = link_id; link = (LINK_DATA *) xpcf_list_find(&server->links, link_find_handler, &key); if (link == NULL) { link = (LINK_DATA *) xpcf_zalloc(sizeof(LINK_DATA)); if (link) { link->bus_type = bus_type; link->link_id = link_id; xpcf_list_init(&link->clients); xpcf_list_add(&server->links, &link->list); TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "Link 0x%p created (bus_type=0x%X, link_id=0x%X)\n", link, bus_type, link_id); } } return link; }
void zb_aps_in_request_key(zb_uint8_t param) { /* get source address from the nwk header and convert it to long address */ zb_apsme_request_nwk_key_pkt_t *pkt = (zb_apsme_request_nwk_key_pkt_t *)ZB_BUF_BEGIN(ZB_BUF_FROM_REF(param)); zb_apsme_request_key_ind_t *ind = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_apsme_request_key_ind_t); TRACE_MSG(TRACE_SECUR2, ">>zb_aps_in_request_key", (FMT__0)); { zb_uint16_t src_short_addr = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_apsde_data_indication_t)->src_addr; zb_address_ieee_by_short(src_short_addr, ind->src_address); } ind->key_type = pkt->key_type; /* TODO: fill partner_address for application key */ ZB_SCHEDULE_CALLBACK(zb_apsme_request_key_indication, param); TRACE_MSG(TRACE_SECUR2, "<<zb_aps_in_request_key", (FMT__0)); }
static int smbsim_serial_open(struct tty_struct *tty, struct file *filp) { SMBSIM_SERIAL_DEV *dev = smbsim_serial_devs + tty->index; TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "0x%p\n", dev); return tty_port_open(&dev->tty_port, tty, filp); }
void nwk_route_disc_failed(zb_uint8_t param) { zb_nlme_status_indication_t *status = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_nlme_status_indication_t); TRACE_MSG(TRACE_NWK1, ">> nwk_route_disc_failed", (FMT__0)); status->status = ZB_NWK_COMMAND_STATUS_NO_ROUTE_AVAILABLE; status->network_addr = ZG->nwk.handle.status_ind_addr; /* notify */ ZB_SCHEDULE_CALLBACK(zb_nlme_status_indication, param); ZB_SCHEDULE_ALARM_CANCEL(zb_nwk_mesh_expiry_route_disc, 0); ZB_SCHEDULE_ALARM(zb_nwk_mesh_expiry_route_disc, 0, ZB_NWK_EXPIRY_ROUTE_DISCOVERY); TRACE_MSG(TRACE_NWK1, ">> nwk_route_disc_failed", (FMT__0)); }
NTSTATUS DeviceOpen(__in BASE_DEVICE * Device, __out BASE_FILE ** ppFile) { BASE_FILE *File; BASE_FILE_PARAMS Params; NTSTATUS Status; PAGED_CODE(); RtlZeroMemory(&Params, sizeof(Params)); Params.PrivateAreaSize = 0; Params.Close = FileClose; Params.Cleanup = FileCleanup; Params.Read = FileRead; Params.Write = FileWrite; Params.Ioctl = FileIoctl; Status = BaseFileCreate(Device, &Params, &File); if (!NT_SUCCESS(Status)) { TRACE_ERR("BaseFileCreate", Status); } else { TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "Device 0x%p opened (file 0x%p)\n", Device, File); *ppFile = File; } return Status; }
void render_destroy(void) { IF_FAILED(init); TRACE_MSG("release render resources\n"); shader_program_file_destroy(&pfile); glDeleteBuffers(2, vbo); glDeleteVertexArrays(1, &vao); parser_clean(&parser); if(str_function) { free(str_function); str_function = NULL; } if(volume) { free(volume); volume = NULL; } init = 0; log_close(); }
int shader_program_file_create(shader_program_file_t *pfile, const char *filename) { char *buffer = NULL; long file_size = 0L; IF_FAILED0(pfile && filename); TRACE_MSG("create shader program file; filename = %s \n", filename); file_size = utils_file_get_size(filename); // file_size + 1 - чтобы хватило места для \0 buffer = (char*) malloc(sizeof(char) * (file_size+1)); if(!utils_read_file(filename, buffer)) { ERROR_MSG("cannot open shader program file\n"); return 0; } if(!parse_and_load_shader(buffer, pfile)) return 0; free(buffer); return 1; }
static FRESULT scan_files(char* path) { FRESULT res; FILINFO fno; DIR dir; int i; char *fn; res = f_opendir(&dir, path); if (res == FR_OK) { i = strlen(path); for (;;) { res = f_readdir(&dir, &fno); if (res != FR_OK || fno.fname[0] == 0) break; fn = fno.fname; if (*fn == '.') continue; if (fno.fattrib & AM_DIR) { TRACE_MSG(&path[i], "/%s", fn); res = scan_files(path); if (res != FR_OK) break; path[i] = 0; } else { DEBUG_MSG("%s/%s", path, fn); } } } return res; }
static zb_buf_t *zb_get_buf(zb_uint8_t is_in) { zb_buf_t *buf = NULL; /* check that zb_init_buffers() was called */ ZB_ASSERT(ZG->bpool.head || ZG->bpool.bufs_allocated[0] || ZG->bpool.bufs_allocated[1]); /* Logically pool divided into 2 parts: input or output. Do not allow one part to eat entire another part to exclude deadlock. */ if (ZG->bpool.bufs_allocated[is_in] < ZB_BUFS_LIMIT) { buf = ZG->bpool.head; if (buf) { VERIFY_BUFS(); ZG->bpool.head = buf->u.next; VERIFY_BUFS(); ZB_BZERO(&buf->u, sizeof(buf->u)); ZG->bpool.bufs_allocated[is_in]++; ZB_ASSERT(ZG->bpool.bufs_allocated[is_in] <= ZB_BUFS_LIMIT); buf->u.hdr.is_in_buf = is_in; } } #ifdef ZB_DEBUG_BUFFERS TRACE_MSG( TRACE_MAC1, "zb_get_buf %hd: buffer %p, ref %hd, head %p, allocated %hd / %hd", (FMT__H_P_H_P_H, is_in, buf, ZB_REF_FROM_BUF(buf), ZG->bpool.head, ZG->bpool.bufs_allocated[0], ZG->bpool.bufs_allocated[1])); #endif return buf; }
void dbSelection::sort(dbDatabase* db, dbOrderByNode* order) { size_t n = nRows; if (n <= 1) { return; } TRACE_MSG(("Sort %d records\n", n)); ObjectRef* refs = new ObjectRef[n]; segment *seg; int k = 0; for (seg = first; seg != NULL; seg = seg->next) { for (int i = 0, nr = seg->nRows; i < nr; i++) { refs[k++].oid = seg->rows[i]; } } dbSortContext ctx; ctx.order = order; sortThreadContext.set(&ctx); iqsort(refs, n); k = 0; for (seg = first; seg != NULL; seg = seg->next) { for (int i = 0, nr = seg->nRows; i < nr; i++) { seg->rows[i] = refs[k++].oid; } } delete[] refs; }
static void send_data() { zb_buf_t *buf = NULL; zb_apsde_data_req_t req; zb_uint8_t *ptr = NULL; zb_short_t i; buf = zb_get_out_buf(); req.dst_addr.addr_short = 0; /* send to ZC */ req.addr_mode = ZB_APS_ADDR_MODE_16_ENDP_PRESENT; req.tx_options = ZB_APSDE_TX_OPT_ACK_TX; req.radius = 1; req.profileid = 2; req.src_endpoint = 10; req.dst_endpoint = 10; buf->u.hdr.handle = 0x11; ZB_BUF_INITIAL_ALLOC(buf, 80, ptr); for (i = 0 ; i < ZB_TEST_DATA_SIZE ; ++i) { ptr[i] = i % 32 + '0'; } ZB_MEMCPY( ZB_GET_BUF_TAIL(buf, sizeof(req)), &req, sizeof(req)); TRACE_MSG(TRACE_APS3, "Sending apsde_data.request", (FMT__0)); ZB_SCHEDULE_CALLBACK(zb_apsde_data_request, ZB_REF_FROM_BUF(buf)); }
void link_add_client(LINK_DATA * link, CLIENT_DATA * client) { TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "Add client 0x%p to link 0x%p\n", client, link); client->link = link; xpcf_list_add(&link->clients, &client->list); }
static void smbsim_serial_close(struct tty_struct *tty, struct file *filp) { SMBSIM_SERIAL_DEV *dev = smbsim_serial_devs + tty->index; TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "0x%p\n", dev); tty_port_close(&dev->tty_port, tty, filp); }
bool win_socket::write(void const* buf, size_t size, time_t timeout) { time_t start = 0; if (state != ss_open) { errcode = not_opened; TRACE_MSG(("Socket is not openned\n")); return false; } if (timeout != WAIT_FOREVER) { start = time(NULL); } do { int rc; if (timeout != WAIT_FOREVER) { fd_set events; struct timeval tm; FD_ZERO(&events); FD_SET(s, &events); tm.tv_sec = (long)timeout; tm.tv_usec = 0; rc = select((int)s+1, NULL, &events, NULL, &tm); if (rc <= 0) { errcode = WSAGetLastError(); TRACE_MSG(("Socket select is failed: %d\n", errcode)); return false; } time_t now = time(NULL); timeout = start + timeout >= now ? timeout + start - now : 0; } rc = send(s, (char*)buf, (int)size, 0); if (rc < 0) { errcode = WSAGetLastError(); TRACE_MSG(("Socket write is failed: %d\n", errcode)); return false; } else if (rc == 0) { errcode = broken_pipe; TRACE_MSG(("Socket is disconnected\n")); return false; } else { buf = (char*)buf + rc; size -= rc; } } while (size != 0); return true; }
void zb_free_buf(zb_buf_t *buf) { /* do trace this function, because it can cause lack of out buffers */ zb_buf_q_ent_t *ent = NULL; /* check that zb_init_buffers() was called */ ZB_ASSERT(ZG->bpool.head || ZG->bpool.bufs_allocated[0] || ZG->bpool.bufs_allocated[1]); ZB_ASSERT(ZG->bpool.bufs_allocated[buf->u.hdr.is_in_buf] > 0); ZG->bpool.bufs_allocated[buf->u.hdr.is_in_buf]--; #ifdef ZB_DEBUG_BUFFERS TRACE_MSG(TRACE_NWK3, "zb_free_buf %p, ref %hd, in buf %hi allocated in %hd out %hd", (FMT__P_H_H_H_H, buf, ZB_REF_FROM_BUF(buf), buf->u.hdr, buf->u.hdr.is_in_buf, ZG->bpool.bufs_allocated[1], ZG->bpool.bufs_allocated[0])); #endif VERIFY_BUF(buf); buf->u.next = ZG->bpool.head; ZG->bpool.head = buf; VERIFY_BUFS(); if (buf->u.hdr.is_in_buf) { /* if we need a buffer for rx packet, we should not pass it to some */ /* other callback */ if (!MAC_CTX().rx_need_buf) ZB_SL_LIST_CUT_HEAD(ZG->sched.inbuf_queue, next, ent); } else { ZB_SL_LIST_CUT_HEAD(ZG->sched.outbuf_queue, next, ent); } if (ent) { ZB_SCHEDULE_CALLBACK(ent->func, ZB_REF_FROM_BUF(zb_get_buf(buf->u.hdr.is_in_buf))); ZB_STK_PUSH(ZG->sched.buf_freelist, next, ent); } #ifdef ZB_DEBUG_BUFFERS TRACE_MSG( TRACE_MAC1, "free_buf: %hd/%hd buf %p, next %p, head %p", (FMT__H_H_P_P_P, ZG->bpool.bufs_allocated[1], ZG->bpool.bufs_allocated[0], buf, buf->u.next, ZG->bpool.head)); #endif }
static int smbsim_serial_write(struct tty_struct *tty, const unsigned char *buf, int count) { SMBSIM_SERIAL_DEV *dev = smbsim_serial_devs + tty->index; int ret; TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "0x%p - count=%d\n", dev, count); DUMP_MEM(buf, count); if (count == 0) { TRACE_MSG(TRACE_LEVEL_ERROR, TRACE_FLAG_DEFAULT, "Invalid count=%u\n", count); return 0; } if (dev->write_size == 0) { if (buf[0] > WRITE_BUF_SZ) { TRACE_MSG(TRACE_LEVEL_ERROR, TRACE_FLAG_DEFAULT, "Invalid size=%u\n", buf[0]); return -EINVAL; } dev->write_size = buf[0]; dev->cur_size = count - 1; if (dev->cur_size) memcpy(dev->write_data, buf + 1, dev->cur_size); } else { memcpy(dev->write_data + dev->cur_size, buf, count); dev->cur_size += count; } if (dev->cur_size < dev->write_size) { TRACE_MSG(TRACE_LEVEL_WARN, TRACE_FLAG_DEFAULT, "Need more data (cur=%u, total=%u)\n", dev->cur_size, dev->write_size); return count; } TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "Write %u bytes\n", dev->write_size); ret = smbsim_serial_port_write(&dev->port, dev->write_data, dev->write_size); dev->write_size = 0; if (ret) return ret; return count; }
NTSTATUS FileWrite(__in BASE_FILE * File, __in PIRP Irp, __in PIO_STACK_LOCATION IrpStack) { CSFBR_FILE_DATA *FileData = (CSFBR_FILE_DATA *) BaseFileGetPrivate(File); CSF_PKT *pkt; ULONG Length = IrpStack->Parameters.Write.Length; PVOID Buffer; NTSTATUS Status = STATUS_SUCCESS; PAGED_CODE(); __try { if (FileData->port_id == 0) { TRACE_MSG(TRACE_LEVEL_ERROR, TRACE_FLAG_DEFAULT, "Not created\n"); Status = STATUS_INVALID_DEVICE_STATE; __leave; } ASSERT(Irp->MdlAddress); Buffer = MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority); if (Buffer == NULL) { Status = STATUS_INSUFFICIENT_RESOURCES; TRACE_ERR("MmGetSystemAddressForMdlSafe", Status); __leave; } TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "Write %u bytes\n", Length); pkt = csf_pkt_alloc(Length); if (pkt == NULL) { Status = STATUS_INSUFFICIENT_RESOURCES; TRACE_ERR("csf_pkt_alloc", Status); __leave; } RtlCopyMemory(csf_pkt_get_buf(pkt), Buffer, Length); if (csf_port_send(FileData->port_id, pkt)) { Status = STATUS_UNSUCCESSFUL; TRACE_ERR("csf_port_send", Status); } csf_pkt_free(pkt); } __finally { BaseFileCompleteRequest(File, Irp, Status); } return Status; }
/* * Build the lists note information for Word for DOS files */ static void vGet0NotesInfo(FILE *pFile, const UCHAR *aucHeader) { TRACE_MSG("vGet0NotesInfo"); vGet0FootnotesInfoAndText(pFile, aucHeader); /* There are no endnotes in a Word for DOS file */ } /* end of vGet0NotesInfo */
struct net_packet *net_packet_create(struct net_packet *packet, int flags) { KOBJ_CREATE(packet, flags, NP_FLAG_ALLOC); TRACE_MSG("net.packet", "creating new packet %x\n", packet); packet->count = 1; packet->data_header = packet->data; return packet; }
void termit_lua_report_error(const char* file, int line, int status) { if (status == 0) return; TRACE_MSG("lua error:"); g_fprintf(stderr, "%s:%d %s\n", file, line, lua_tostring(L, -1)); lua_pop(L, 1); }
/* * Build the lists note information for WinWord 1/2 files */ static void vGet2NotesInfo(FILE *pFile, const UCHAR *aucHeader) { TRACE_MSG("vGet2NotesInfo"); vGet2FootnotesInfo(pFile, aucHeader); vGet2FootnotesText(pFile, aucHeader); /* There are no endnotes in a WinWord 1/2 file */ } /* end of vGet2NotesInfo */
void net_receive_packet(struct net_dev *nd, struct net_packet *packets, int count) { TRACE_MSG("net.packet", "receive %d packets\n", count); atomic_fetch_add_explicit(&nd->rx_count, count, memory_order_relaxed); for(int i=0;i<count;i++) { atomic_fetch_add_explicit(&nd->rx_bytes, packets[i].length, memory_order_relaxed); net_data_receive(nd, &packets[i]); } }
void dbSelection::sort(dbDatabase* db, dbOrderByNode* order) { size_t i, j, k, n = nRows; oid_t temp; if (n <= 1) { return; } TRACE_MSG(("Sort %d records\n", n)); segment** index = new segment*[(n + quantum - 1) / quantum]; segment* seg = first; for (i = 0; seg != NULL; seg = seg->next) { index[i++] = seg; } for (i = n/2, j = i; i >= 1; i--) { k = i; oid_t topId = ELEM(k); dbRecord* top = db->getRow(topId); do { if (k*2 == n || compare(ROW(k*2), ROW(k*2+1), order) > 0) { if (compare(top, ROW(k*2), order) >= 0) { break; } ELEM(k) = ELEM(k*2); k = k*2; } else { if (compare(top, ROW(k*2+1), order) >= 0) { break; } ELEM(k) = ELEM(k*2+1); k = k*2+1; } } while (k <= j); ELEM(k) = topId; } for (i = n; i >= 2; i--) { SWAP(1, i); oid_t topId = ELEM(1); dbRecord* top = db->getRow(topId); for (k = 1, j = (i-1)/2; k <= j;) { if (k*2 == i-1 || compare(ROW(k*2), ROW(k*2+1), order) > 0) { if (compare(top, ROW(k*2), order) >= 0) { break; } ELEM(k) = ELEM(k*2); k = k*2; } else { if (compare(top, ROW(k*2+1), order) >= 0) { break; } ELEM(k) = ELEM(k*2+1); k = k*2+1; } } ELEM(k) = topId; } delete[] index; }
void FileCleanup(__in BASE_FILE * File) { PAGED_CODE(); UNREFERENCED_PARAMETER(File); TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "File 0x%p cleaned up\n", File); }
void zb_aps_in_remove_device(zb_uint8_t param) { /* get source address from the nwk header and convert it to long address */ zb_apsme_remove_device_pkt_t *pkt = (zb_apsme_remove_device_pkt_t *)ZB_BUF_BEGIN(ZB_BUF_FROM_REF(param)); zb_apsme_remove_device_ind_t *ind = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_apsme_remove_device_ind_t); TRACE_MSG(TRACE_SECUR3, ">>zb_aps_in_remove_device %d", (FMT__H, param)); { zb_uint16_t src_short_addr = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_apsde_data_indication_t)->src_addr; zb_address_ieee_by_short(src_short_addr, ind->src_address); } ZB_IEEE_ADDR_COPY(ind->child_address, pkt->child_address); ZB_SCHEDULE_CALLBACK(zb_apsme_remove_device_indication, param); TRACE_MSG(TRACE_SECUR3, "<<zb_aps_in_remove_device", (FMT__0)); }
MAIN() { ARGV_UNUSED; #ifndef KEIL if ( argc < 3 ) { printf("%s <read pipe path> <write pipe path>\n", argv[0]); return 0; } #endif #if defined ZB_NS_BUILD && defined ZB_SECURITY if ( argc > 3 && !strcmp(argv[3], "auth") ) { g_auth = 1; } #endif /* Init device, load IB values from nvram or set it to default */ #ifndef ZB8051 ZB_INIT("zdo_zed", argv[1], argv[2]); #else ZB_INIT("zdo_zed", "2", "2"); #endif /* set ieee addr */ ZB_IEEE_ADDR_COPY(ZB_PIB_EXTENDED_ADDRESS(), &g_ieee_addr); #ifndef ZB_NS_BUILD ZB_UPDATE_LONGMAC(); #endif #ifdef ZB_SECURITY /* turn security */ ZB_NIB_SECURITY_LEVEL() = g_auth ? 1 : 0; #endif /* become an ED */ ZB_NIB_DEVICE_TYPE() = ZB_NWK_DEVICE_TYPE_ED; ZB_PIB_RX_ON_WHEN_IDLE() = ZB_TRUE; if (zdo_dev_start() != RET_OK) { TRACE_MSG(TRACE_ERROR, "zdo_dev_start failed", (FMT__0)); } else { zdo_main_loop(); } TRACE_DEINIT(); MAIN_RETURN(0); }
void libc_handler(int operation, int data) { DEBUG_MSG(("Invoking libc handler: %i", operation)); switch (operation) { case libc_write_character: { TRACE_MSG(("write character %c", data)); write_char((char) data); break; } case libc_clear_screen: { TRACE_MSG(("clear screen")); clear_screen(); break; } default: { ERROR_MSG(("Invalid operation: %i", operation)); } } DEBUG_MSG(("Invoked libc handler: %i", operation)); }
socket_t* win_socket::accept() { if (state != ss_open) { errcode = not_opened; TRACE_MSG(("Socket not openned\n")); return NULL; } SOCKET new_sock = ::accept(s, NULL, NULL ); if (new_sock == INVALID_SOCKET) { errcode = WSAGetLastError(); TRACE_MSG(("Socket accept failed: %d\n", errcode)); return NULL; } else { #if SOCK_LINGER static struct linger l = {1, LINGER_TIME}; if (setsockopt(new_sock, SOL_SOCKET, SO_LINGER, (char*)&l, sizeof l) != 0) { errcode = WSAGetLastError(); TRACE_MSG(("Failed to set socket options: %d\n", errcode)); closesocket(new_sock); return NULL; } #endif #if SOCK_NO_DELAY int enabled = 1; if (setsockopt(new_sock, IPPROTO_TCP, TCP_NODELAY, (char*)&enabled, sizeof enabled) != 0) { errcode = WSAGetLastError(); TRACE_MSG(("Failed to set socket options: %d\n", errcode)); closesocket(new_sock); return NULL; } #endif #if SOCK_SNDBUF_SIZE int size = SOCK_SNDBUF_SIZE; setsockopt(s, SOL_SOCKET, SO_SNDBUF, (char*)&size, sizeof size); #endif errcode = ok; return new win_socket(new_sock); } }
void SerialPortReadHandler(SMBSIM_SERIAL_PORT * port, const void *buf, size_t len) { DEVICE_DATA *DeviceData = CONTAINING_RECORD(port, DEVICE_DATA, Port); RtlCopyMemory(DeviceData->ReadData, buf, len); DeviceData->ReadLength = (ULONG) len; TRACE_MSG(TRACE_LEVEL_INFO, TRACE_FLAG_DEFAULT, "Signal event!!!\n"); KeSetEvent(&DeviceData->Event, IO_NO_INCREMENT, FALSE); }
/* This function called periodically to find expired route requests */ void zb_nwk_mesh_expiry_rreq(zb_uint8_t param) { TRACE_MSG(TRACE_NWK1, ">> expiry_rreq p %hd", (FMT__H, param)); TRACE_MSG(TRACE_NWK1, "rreq cnt %d", (FMT__D, ZG->nwk.nib.rreq_cnt)); if ( ZG->nwk.nib.rreq_cnt ) { zb_ushort_t i = 0; for (i = ZG->nwk.nib.rreq_num; i < ZB_NWK_RREQ_TABLE_SIZE; i++) { if ( ZG->nwk.nib.rreq[i].used ) { /* check we have buffer to send */ if ( param == (zb_uint8_t)(-1) ) { /* wait for buffer */ TRACE_MSG(TRACE_NWK1, "wait f/out buf", (FMT__0)); ZB_GET_OUT_BUF_DELAYED(zb_nwk_mesh_expiry_rreq); goto done; } TRACE_MSG(TRACE_NWK1, "resend %d request", (FMT__D, i)); zb_nwk_mesh_resend_rreq(ZB_BUF_FROM_REF(param), &ZG->nwk.nib.rreq[i]); param = -1; } } ZG->nwk.nib.rreq_num = 0; if ( ZG->nwk.nib.rreq_cnt ) { /* Schedule to call later */ ZB_SCHEDULE_ALARM(zb_nwk_mesh_expiry_rreq, -1, ZB_NWK_RREQ_RETRY_INTERVAL); } } else { /* No route requests, do not schedule callback */ } done: TRACE_MSG(TRACE_NWK1, "<< expiry_rreq", (FMT__0)); }