Skip to content

Commit

Permalink
[SQUASH ME] fixed renaming hickup (hopefully completely)
Browse files Browse the repository at this point in the history
  • Loading branch information
BytesGalore authored and BytesGalore committed May 12, 2015
1 parent bb4b687 commit 60a79c5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions sys/net/network_layer/fib/fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static size_t notify_rp_pos = 0;
/**
* @brief the kernel_pid_t for notifying the RPs
*/
static kernel_pid_t notify_rrp[FIB_MAX_REGISTERED_RP];
static kernel_pid_t notify_rp[FIB_MAX_REGISTERED_RP];

/**
* @brief the prefix handled by the RP
Expand Down Expand Up @@ -297,21 +297,21 @@ static int fib_signal_rp(uint8_t *dst, size_t dst_size, uint32_t dst_flags)
content.address_flags = dst_flags;
int ret = -ENOENT;

msg.type = FIB_MSG_RRP_SIGNAL;
msg.type = FIB_MSG_RP_SIGNAL;
msg.content.ptr = (void *)&content;

for (size_t i = 0; i < FIB_MAX_REGISTERED_RP; ++i) {
if (notify_rrp[i] != KERNEL_PID_UNDEF) {
if (notify_rp[i] != KERNEL_PID_UNDEF) {
DEBUG("[fib_signal_rp] send msg@: %p to pid[%d]: %d\n", \
msg.content.ptr, (int)i, (int)notify_rrp[i]);
msg.content.ptr, (int)i, (int)notify_rp[i]);

/* do only signal a RP if its registered prefix matches */
if (universal_address_compare(prefix_rp[i], dst, &dst_size) == 0) {
/* the receiver, i.e. the RP, MUST copy the content value.
* using the provided pointer after replying this message
* will lead to errors
*/
msg_send_receive(&msg, &reply, notify_rrp[i]);
msg_send_receive(&msg, &reply, notify_rp[i]);
DEBUG("[fib_signal_rp] got reply.");
}
}
Expand Down Expand Up @@ -440,7 +440,7 @@ void fib_init(void)
mutex_lock(&mtx_access);

for (size_t i = 0; i < FIB_MAX_REGISTERED_RP; ++i) {
notify_rrp[i] = KERNEL_PID_UNDEF;
notify_rp[i] = KERNEL_PID_UNDEF;
prefix_rp[i] = NULL;
}

Expand All @@ -464,7 +464,7 @@ void fib_deinit(void)
mutex_lock(&mtx_access);

for (size_t i = 0; i < FIB_MAX_REGISTERED_RP; ++i) {
notify_rrp[i] = KERNEL_PID_UNDEF;
notify_rp[i] = KERNEL_PID_UNDEF;
prefix_rp[i] = NULL;
}

Expand Down Expand Up @@ -499,7 +499,7 @@ int fib_register_rrp(uint8_t *prefix, size_t prefix_size)
}

if (notify_rp_pos < FIB_MAX_REGISTERED_RP) {
notify_rrp[notify_rp_pos] = sched_active_pid;
notify_rp[notify_rp_pos] = sched_active_pid;
universal_address_container_t *container = universal_address_add(prefix, prefix_size);
prefix_rp[notify_rp_pos] = container;
notify_rp_pos++;
Expand All @@ -524,12 +524,12 @@ int fib_get_num_used_entries(void)

/* print functions */

void fib_print_notify_rrp(void)
void fib_print_notify_rp(void)
{
mutex_lock(&mtx_access);

for (size_t i = 0; i < FIB_MAX_REGISTERED_RP; ++i) {
printf("[fib_print_notify_rrp] pid[%d]: %d\n", (int)i, (int)notify_rrp[i]);
printf("[fib_print_notify_rp] pid[%d]: %d\n", (int)i, (int)notify_rp[i]);
}

mutex_unlock(&mtx_access);
Expand Down

0 comments on commit 60a79c5

Please sign in to comment.