On 18/10/18 22:32, Jonas Bonn wrote:
...

+#include <ofono/log.h>
+#include <ofono/types.h>
+
+#include "ofono.h"
+#include "gemaltomodem.h"
+
+enum gemalto_auth_option {
+    GEMALTO_AUTH_DEFAULTS        = 0x00,
+    GEMALTO_AUTH_USE_SGAUTH        = 0x01,
+    GEMALTO_AUTH_ORDER_PWD_USR    = 0x02,
+    GEMALTO_AUTH_ALW_ALL_PARAMS    = 0x04,
+};

Using an enumeration to name flags feels awkward.  I would #define these:

#define AUTH_F_USE_SGATH (1<<0)
#define AUTH_F_SWAP_CREDENTIALS (1<<1)
#define AUTH_F_ALWAYS_ALL_PARAMS (1<<2)



It may feel awkward but I actually find that (enum'ing flags) quite useful for debugging with gdb - it allows the debugger to refer to those flags by name.

Cheers,
-Slava
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono

Reply via email to