You have defined the priority member as a pointer to int. You probably meant to define it just as an int. For that reason the comparison in
if (q->fr == NULL || q->fr->priority>prrt )
fails. You are comparing the pointers (addresses) instead of the values. Either make priority an int, or dereference the pointer when comparing:
if (q->fr == NULL || *q->fr->priority > *prrt )
The same applied to the comparison in the while statement.
Besides that your implementation has several other weaknesses:
- You never update the bk pointer of your doubly linked list
- You should use different structures for the queue object itself and the queue nodes. Otherwise, every queue node contains a surplus counter.
- If you want to have a later chance of upgrading your code to C++, don't use the new keyword for variable names.