use restore_prio() instead of set_prio()
authorOlivier Matz <zer0@droids-corp.org>
Thu, 6 Mar 2014 17:16:41 +0000 (18:16 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Sun, 9 Mar 2014 21:13:08 +0000 (22:13 +0100)
xbee_user.c

index ca9d475..ecca816 100644 (file)
@@ -454,7 +454,7 @@ int xbeeapp_send_atcmd(char *atcmd_str, void *param,
 
        prio = callout_mgr_set_prio(&xbeeboard.intr_cm, XBEE_PRIO);
        ret = xbeeapp_send(&ctx, XBEE_TYPE_ATCMD, &msg, foreground);
-       callout_mgr_set_prio(&xbeeboard.intr_cm, prio);
+       callout_mgr_restore_prio(&xbeeboard.intr_cm, prio);
 
        return ret;
 }
@@ -490,7 +490,7 @@ int xbeeapp_send_msg(uint64_t addr, struct xbee_msg *msg, int foreground)
 
        prio = callout_mgr_set_prio(&xbeeboard.intr_cm, XBEE_PRIO);
        ret = xbeeapp_send(&ctx, XBEE_TYPE_XMIT, &msg2, foreground);
-       callout_mgr_set_prio(&xbeeboard.intr_cm, prio);
+       callout_mgr_restore_prio(&xbeeboard.intr_cm, prio);
 
        return ret;
 }
@@ -559,7 +559,7 @@ void xbee_mainloop(void)
                                xbee_dev_send('C', NULL);
                                xbee_dev_send('N', NULL);
                                xbee_dev_send('\n', NULL);
-                               callout_mgr_set_prio(&xbeeboard.intr_cm, prio);
+                               callout_mgr_restore_prio(&xbeeboard.intr_cm, prio);
                                xbee_raw = 0;
                                rdline_newline(&xbeeboard.rdl,
                                               xbeeboard.prompt);