There are a large number of files in the tree that define _GNU_SOURCE
despite not actually using features hidden behind this flag. This patch
removes all these definitions in one fell swoop...
The driver vtables are read-only structures. This patch declares them as
'const' allowing the compiler to (optionally) put them in the RELRO
section. RELRO pages may be marked as read-only by the linker after
the relocations have been done ensuring that they aren't inadvertently
or maliciously altered at runtime.
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)
// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@
- !E
+ E == NULL
// </smpl>
* renamed MAX_LEN to IP_ADDR_LEN
* removed memory leak from unneeded strdup when parsing xml response.
* better handling of AT error responses
* reduced number of caif interfaces to 4
The reason for this is twofold. First the current code actually leaks
memory since it uses g_strdup on username/password and never frees it
anywhere. Second the username/password command can just be sent inside
activate_primary, no reason to do it in the callback.
The fix removes the username / password structure members and moves the
AT*EIAAUW handling to activate_primary. This is almost exactly like the
username / password / context definition for MBM modems.