Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault in function mbuf_sort #45

Open
FoyetFan opened this issue Jul 29, 2023 · 1 comment
Open

Segmentation Fault in function mbuf_sort #45

FoyetFan opened this issue Jul 29, 2023 · 1 comment

Comments

@FoyetFan
Copy link

FoyetFan commented Jul 29, 2023

When data packets need to be sorted, segment errors will be triggered in function mbuf_sort.
I think it should be like this, and it does work.

mbuf_sort(){
...
if ((*next)->frag_cnt < (*curr)->frag_cnt) 
{ 
    // swap pointers for curr and curr->next 
    schc_mbuf_t *temp; 
    temp = *curr; 
    *curr = *next; 
   *next = temp; 

    temp = (*curr)->next; 
    (*curr)->next = (*next)->next;
    (*next)->next = temp;
    curr = &(*curr)->next; swapped = 1; 
}
...
}
@bartmoons
Copy link
Collaborator

Could you give more information when this happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants