Changed files:
gnokii-gcc4.patch -> 1.2
-diff -Nru gnokii-0.6.4.orig/common/cfgreader.c gnokii-0.6.4/common/cfgreader.c
---- gnokii-0.6.4.orig/common/cfgreader.c 2004-10-17 21:44:20.000000000 +0200
-+++ gnokii-0.6.4/common/cfgreader.c 2005-04-28 18:29:43.464741688 +0200
-@@ -450,7 +450,7 @@
+diff -burN gnokii-0.6.5.orig/common/cfgreader.c gnokii-0.6.5/common/cfgreader.c
+--- gnokii-0.6.5.orig/common/cfgreader.c 2005-05-01 22:41:32.576264944 +0200
++++ gnokii-0.6.5/common/cfgreader.c 2005-05-01 22:44:36.464309712 +0200
+@@ -554,7 +554,7 @@
retval = gn_cfg_read_default();
- (char *)*bindir = gn_cfg_get(gn_cfg_info, "global", "bindir");
+ *bindir = gn_cfg_get(gn_cfg_info, "global", "bindir");
retval = gn_cfg_read_default();
- (char *)*bindir = gn_cfg_get(gn_cfg_info, "global", "bindir");
+ *bindir = gn_cfg_get(gn_cfg_info, "global", "bindir");
- if (!*bindir) *bindir = gn_cfg_get(gn_cfg_info, "gnokiid", "bindir");
- if (!*bindir) *bindir = "/usr/local/sbin";
-
-iff -Nru gnokii-0.6.4.orig/common/links/atbus.c gnokii-0.6.4/common/links/atbus.c
---- gnokii-0.6.4.orig/common/links/atbus.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/links/atbus.c 2005-04-28 18:24:02.840524440 +0200
-@@ -258,7 +258,7 @@
+ if (!*bindir)
+ *bindir = gn_cfg_get(gn_cfg_info, "gnokiid", "bindir");
+ if (!*bindir)
+diff -burN gnokii-0.6.5.orig/common/links/atbus.c gnokii-0.6.5/common/links/atbus.c
+--- gnokii-0.6.5.orig/common/links/atbus.c 2005-05-01 22:41:32.605260536 +0200
++++ gnokii-0.6.5/common/links/atbus.c 2005-05-01 22:41:57.773434392 +0200
+@@ -262,7 +262,7 @@
state->link.send_message = &at_send_message;
businst->rbuf_pos = 1;
businst->binlen = 1;
state->link.send_message = &at_send_message;
businst->rbuf_pos = 1;
businst->binlen = 1;
switch (state->config.connection_type) {
case GN_CT_Serial:
switch (state->config.connection_type) {
case GN_CT_Serial:
err:
dprintf("AT bus initialization failed (%d)\n", error);
free(AT_BUSINST(state));
err:
dprintf("AT bus initialization failed (%d)\n", error);
free(AT_BUSINST(state));
-diff -Nru gnokii-0.6.4.orig/common/links/fbus-3110.c gnokii-0.6.4/common/links/fbus-3110.c
---- gnokii-0.6.4.orig/common/links/fbus-3110.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/links/fbus-3110.c 2005-04-28 18:26:36.984091056 +0200
-@@ -351,7 +351,7 @@
+diff -burN gnokii-0.6.5.orig/common/links/fbus-3110.c gnokii-0.6.5/common/links/fbus-3110.c
+--- gnokii-0.6.5.orig/common/links/fbus-3110.c 2005-05-01 22:41:32.604260688 +0200
++++ gnokii-0.6.5/common/links/fbus-3110.c 2005-05-01 22:41:57.775434088 +0200
+@@ -355,7 +355,7 @@
state->config.init_length = 100;
/* Start up the link */
state->config.init_length = 100;
/* Start up the link */
return GN_ERR_MEMORYFULL;
FBUSINST(state)->request_sequence_number = 0x10;
return GN_ERR_MEMORYFULL;
FBUSINST(state)->request_sequence_number = 0x10;
if (!fb3110_serial_open(state)) {
free(FBUSINST(state));
if (!fb3110_serial_open(state)) {
free(FBUSINST(state));
-diff -Nru gnokii-0.6.4.orig/common/links/fbus.c gnokii-0.6.4/common/links/fbus.c
---- gnokii-0.6.4.orig/common/links/fbus.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/links/fbus.c 2005-04-28 18:25:10.309267632 +0200
-@@ -623,7 +623,7 @@
- state->config.init_length = 250;
+diff -burN gnokii-0.6.5.orig/common/links/fbus-phonet.c gnokii-0.6.5/common/links/fbus-phonet.c
+--- gnokii-0.6.5.orig/common/links/fbus-phonet.c 2005-05-01 22:41:32.605260536 +0200
++++ gnokii-0.6.5/common/links/fbus-phonet.c 2005-05-01 22:41:57.778433632 +0200
+@@ -296,7 +296,7 @@
+ state->link.loop = &phonet_loop;
+ state->link.send_message = &phonet_send_message;
- /* Start up the link */
-- if ((FBUSINST(state) = calloc(1, sizeof(fbus_link))) == NULL)
-+ if (((void *)FBUSINST(state) = calloc(1, sizeof(fbus_link))) == NULL)
+- if ((FBUSINST(state) = calloc(1, sizeof(phonet_incoming_message))) == NULL)
++ if (((void *)FBUSINST(state) = calloc(1, sizeof(phonet_incoming_message))) == NULL)
return GN_ERR_MEMORYFULL;
return GN_ERR_MEMORYFULL;
- FBUSINST(state)->request_sequence_number = 0;
-@@ -672,7 +672,7 @@
+ switch (state->config.connection_type) {
+@@ -312,7 +312,7 @@
+ if (error != GN_ERR_NONE) {
free(FBUSINST(state));
- FBUSINST(state) = NULL;
+ (void *)FBUSINST(state) = NULL;
free(FBUSINST(state));
- FBUSINST(state) = NULL;
+ (void *)FBUSINST(state) = NULL;
-diff -Nru gnokii-0.6.4.orig/common/links/fbus-phonet.c gnokii-0.6.4/common/links/fbus-phonet.c
---- gnokii-0.6.4.orig/common/links/fbus-phonet.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/links/fbus-phonet.c 2005-04-28 18:26:01.852431880 +0200
-@@ -286,7 +286,7 @@
- state->link.loop = &phonet_loop;
- state->link.send_message = &phonet_send_message;
+diff -burN gnokii-0.6.5.orig/common/links/fbus.c gnokii-0.6.5/common/links/fbus.c
+--- gnokii-0.6.5.orig/common/links/fbus.c 2005-05-01 22:41:32.605260536 +0200
++++ gnokii-0.6.5/common/links/fbus.c 2005-05-01 22:41:57.777433784 +0200
+@@ -628,7 +628,7 @@
+ state->config.init_length = 250;
-- if ((FBUSINST(state) = calloc(1, sizeof(phonet_incoming_message))) == NULL)
-+ if (((void *)FBUSINST(state) = calloc(1, sizeof(phonet_incoming_message))) == NULL)
+ /* Start up the link */
+- if ((FBUSINST(state) = calloc(1, sizeof(fbus_link))) == NULL)
++ if (((void *)FBUSINST(state) = calloc(1, sizeof(fbus_link))) == NULL)
return GN_ERR_MEMORYFULL;
return GN_ERR_MEMORYFULL;
- switch (state->config.connection_type) {
-@@ -301,7 +301,7 @@
+ FBUSINST(state)->request_sequence_number = 0;
+@@ -677,7 +677,7 @@
- if (error != GN_ERR_NONE) {
free(FBUSINST(state));
- FBUSINST(state) = NULL;
+ (void *)FBUSINST(state) = NULL;
free(FBUSINST(state));
- FBUSINST(state) = NULL;
+ (void *)FBUSINST(state) = NULL;
-diff -Nru gnokii-0.6.4.orig/common/links/gnbus.c gnokii-0.6.4/common/links/gnbus.c
---- gnokii-0.6.4.orig/common/links/gnbus.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/links/gnbus.c 2005-04-28 18:28:01.787199024 +0200
+diff -burN gnokii-0.6.5.orig/common/links/gnbus.c gnokii-0.6.5/common/links/gnbus.c
+--- gnokii-0.6.5.orig/common/links/gnbus.c 2005-05-01 22:41:32.605260536 +0200
++++ gnokii-0.6.5/common/links/gnbus.c 2005-05-01 22:41:57.779433480 +0200
@@ -284,7 +284,7 @@
state->link.send_message = gnbus_send_message;
@@ -284,7 +284,7 @@
state->link.send_message = gnbus_send_message;
-diff -Nru gnokii-0.6.4.orig/common/links/m2bus.c gnokii-0.6.4/common/links/m2bus.c
---- gnokii-0.6.4.orig/common/links/m2bus.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/links/m2bus.c 2005-04-28 18:27:16.001159560 +0200
-@@ -460,7 +460,7 @@
+diff -burN gnokii-0.6.5.orig/common/links/m2bus.c gnokii-0.6.5/common/links/m2bus.c
+--- gnokii-0.6.5.orig/common/links/m2bus.c 2005-05-01 22:41:32.605260536 +0200
++++ gnokii-0.6.5/common/links/m2bus.c 2005-05-01 22:41:57.780433328 +0200
+@@ -461,7 +461,7 @@
state->link.send_message = m2bus_send_message;
/* Start up the link */
state->link.send_message = m2bus_send_message;
/* Start up the link */
return GN_ERR_MEMORYFULL;
M2BUSINST(state)->request_sequence_number = 2;
return GN_ERR_MEMORYFULL;
M2BUSINST(state)->request_sequence_number = 2;
}
if (err != GN_ERR_NONE) {
free(M2BUSINST(state));
}
if (err != GN_ERR_NONE) {
free(M2BUSINST(state));
-diff -Nru gnokii-0.6.4.orig/common/phones/atgen.c gnokii-0.6.4/common/phones/atgen.c
---- gnokii-0.6.4.orig/common/phones/atgen.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/phones/atgen.c 2005-04-28 18:21:12.280453512 +0200
-@@ -1645,7 +1645,7 @@
+diff -burN gnokii-0.6.5.orig/common/phones/atgen.c gnokii-0.6.5/common/phones/atgen.c
+--- gnokii-0.6.5.orig/common/phones/atgen.c 2005-05-01 22:41:32.614259168 +0200
++++ gnokii-0.6.5/common/phones/atgen.c 2005-05-01 22:41:57.782433024 +0200
+@@ -1683,7 +1683,7 @@
return GN_ERR_MEMORYFULL;
state->driver.incoming_functions = drvinst->incoming_functions;
return GN_ERR_MEMORYFULL;
state->driver.incoming_functions = drvinst->incoming_functions;
drvinst->manufacturer_error = NULL;
drvinst->memorytype = GN_MT_XX;
drvinst->memoryoffset = 0;
drvinst->manufacturer_error = NULL;
drvinst->memorytype = GN_MT_XX;
drvinst->memoryoffset = 0;
if (ret) {
dprintf("Initialization failed (%d)\n", ret);
free(AT_DRVINST(state));
if (ret) {
dprintf("Initialization failed (%d)\n", ret);
free(AT_DRVINST(state));
{
if (AT_DRVINST(state)) {
free(AT_DRVINST(state));
{
if (AT_DRVINST(state)) {
free(AT_DRVINST(state));
}
return pgen_terminate(data, state);
}
}
return pgen_terminate(data, state);
}
-diff -Nru gnokii-0.6.4.orig/common/phones/gnapplet.c gnokii-0.6.4/common/phones/gnapplet.c
---- gnokii-0.6.4.orig/common/phones/gnapplet.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/phones/gnapplet.c 2005-04-28 18:22:56.226651288 +0200
-@@ -419,7 +419,7 @@
+diff -burN gnokii-0.6.5.orig/common/phones/gnapplet.c gnokii-0.6.5/common/phones/gnapplet.c
+--- gnokii-0.6.5.orig/common/phones/gnapplet.c 2005-05-01 22:41:32.613259320 +0200
++++ gnokii-0.6.5/common/phones/gnapplet.c 2005-05-01 22:41:57.785432568 +0200
+@@ -423,7 +423,7 @@
if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
return gnapplet_initialise(state);
case GN_OP_Terminate:
if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
return gnapplet_initialise(state);
case GN_OP_Terminate:
return pgen_terminate(data, state);
case GN_OP_GetImei:
case GN_OP_GetModel:
return pgen_terminate(data, state);
case GN_OP_GetImei:
case GN_OP_GetModel:
/* Copy in the phone info */
memcpy(&(state->driver), &driver_gnapplet, sizeof(gn_driver));
/* Copy in the phone info */
memcpy(&(state->driver), &driver_gnapplet, sizeof(gn_driver));
return GN_ERR_MEMORYFULL;
switch (state->config.connection_type) {
return GN_ERR_MEMORYFULL;
switch (state->config.connection_type) {
err = gnbus_initialise(state);
break;
default:
err = gnbus_initialise(state);
break;
default:
return GN_ERR_NOTSUPPORTED;
}
return GN_ERR_NOTSUPPORTED;
}
gn_data_clear(&d);
if ((err = gnapplet_identify(&d, state)) != GN_ERR_NONE) {
gn_data_clear(&d);
if ((err = gnapplet_identify(&d, state)) != GN_ERR_NONE) {
-diff -Nru gnokii-0.6.4.orig/common/phones/nk3110.c gnokii-0.6.4/common/phones/nk3110.c
---- gnokii-0.6.4.orig/common/phones/nk3110.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/phones/nk3110.c 2005-04-28 18:19:17.935836536 +0200
-@@ -169,7 +169,7 @@
+diff -burN gnokii-0.6.5.orig/common/phones/nk3110.c gnokii-0.6.5/common/phones/nk3110.c
+--- gnokii-0.6.5.orig/common/phones/nk3110.c 2005-05-01 22:41:32.612259472 +0200
++++ gnokii-0.6.5/common/phones/nk3110.c 2005-05-01 22:41:57.786432416 +0200
+@@ -171,7 +171,7 @@
if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
return P3110_Initialise(state);
case GN_OP_Terminate:
if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
return P3110_Initialise(state);
case GN_OP_Terminate:
return pgen_terminate(data, state);
case GN_OP_GetModel:
case GN_OP_GetRevision:
return pgen_terminate(data, state);
case GN_OP_GetModel:
case GN_OP_GetRevision:
/* Copy in the phone info */
memcpy(&(state->driver), &driver_nokia_3110, sizeof(gn_driver));
/* Copy in the phone info */
memcpy(&(state->driver), &driver_nokia_3110, sizeof(gn_driver));
error = GN_ERR_MEMORYFULL;
goto retval;
}
error = GN_ERR_MEMORYFULL;
goto retval;
}
-diff -Nru gnokii-0.6.4.orig/common/phones/nk6100.c gnokii-0.6.4/common/phones/nk6100.c
---- gnokii-0.6.4.orig/common/phones/nk6100.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/phones/nk6100.c 2005-04-28 18:17:38.371972544 +0200
-@@ -238,7 +238,7 @@
+diff -burN gnokii-0.6.5.orig/common/phones/nk6100.c gnokii-0.6.5/common/phones/nk6100.c
+--- gnokii-0.6.5.orig/common/phones/nk6100.c 2005-05-01 22:41:32.613259320 +0200
++++ gnokii-0.6.5/common/phones/nk6100.c 2005-05-01 22:41:57.790431808 +0200
+@@ -239,7 +239,7 @@
if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
return Initialise(state);
case GN_OP_Terminate:
if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
return Initialise(state);
case GN_OP_Terminate:
return pgen_terminate(data, state);
case GN_OP_GetSpeedDial:
return GetSpeedDial(data, state);
return pgen_terminate(data, state);
case GN_OP_GetSpeedDial:
return GetSpeedDial(data, state);
/* Copy in the phone info */
memcpy(&(state->driver), &driver_nokia_6100, sizeof(gn_driver));
/* Copy in the phone info */
memcpy(&(state->driver), &driver_nokia_6100, sizeof(gn_driver));
return GN_ERR_MEMORYFULL;
switch (state->config.connection_type) {
return GN_ERR_MEMORYFULL;
switch (state->config.connection_type) {
err = m2bus_initialise(state);
break;
default:
err = m2bus_initialise(state);
break;
default:
return GN_ERR_NOTSUPPORTED;
}
return GN_ERR_NOTSUPPORTED;
}
authorize or set keytable */
if ((err = IdentifyPhone(state)) != GN_ERR_NONE) {
authorize or set keytable */
if ((err = IdentifyPhone(state)) != GN_ERR_NONE) {
if (DRVINSTANCE(state)->pm->flags & PM_AUTHENTICATION) {
/* Now test the link and authenticate ourself */
if ((err = Authentication(state, DRVINSTANCE(state)->imei)) != GN_ERR_NONE) {
if (DRVINSTANCE(state)->pm->flags & PM_AUTHENTICATION) {
/* Now test the link and authenticate ourself */
if ((err = Authentication(state, DRVINSTANCE(state)->imei)) != GN_ERR_NONE) {
/* FIXME: build a default table */
} else {
if (BuildKeytable(state) != GN_ERR_NONE) {
/* FIXME: build a default table */
} else {
if (BuildKeytable(state) != GN_ERR_NONE) {
return GN_ERR_NOTSUPPORTED;
}
}
return GN_ERR_NOTSUPPORTED;
}
}
-diff -Nru gnokii-0.6.4.orig/common/phones/nk6160.c gnokii-0.6.4/common/phones/nk6160.c
---- gnokii-0.6.4.orig/common/phones/nk6160.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/phones/nk6160.c 2005-04-28 18:14:41.534855872 +0200
+diff -burN gnokii-0.6.5.orig/common/phones/nk6160.c gnokii-0.6.5/common/phones/nk6160.c
+--- gnokii-0.6.5.orig/common/phones/nk6160.c 2005-05-01 22:41:32.613259320 +0200
++++ gnokii-0.6.5/common/phones/nk6160.c 2005-05-01 22:41:57.791431656 +0200
@@ -189,7 +189,7 @@
if (error) {
dprintf("Initialization failed (%d)\n", error);
@@ -189,7 +189,7 @@
if (error) {
dprintf("Initialization failed (%d)\n", error);
-diff -Nru gnokii-0.6.4.orig/common/phones/nk7110.c gnokii-0.6.4/common/phones/nk7110.c
---- gnokii-0.6.4.orig/common/phones/nk7110.c 2004-10-17 21:44:21.000000000 +0200
-+++ gnokii-0.6.4/common/phones/nk7110.c 2005-04-28 18:13:52.087373032 +0200
-@@ -184,7 +184,7 @@
+diff -burN gnokii-0.6.5.orig/common/phones/nk7110.c gnokii-0.6.5/common/phones/nk7110.c
+--- gnokii-0.6.5.orig/common/phones/nk7110.c 2005-05-01 22:41:32.614259168 +0200
++++ gnokii-0.6.5/common/phones/nk7110.c 2005-05-01 22:41:57.793431352 +0200
+@@ -199,7 +199,7 @@
case GN_OP_Init:
return NK7110_Initialise(state);
case GN_OP_Terminate:
case GN_OP_Init:
return NK7110_Initialise(state);
case GN_OP_Terminate:
return pgen_terminate(data, state);
case GN_OP_GetModel:
return NK7110_GetModel(data, state);
return pgen_terminate(data, state);
case GN_OP_GetModel:
return NK7110_GetModel(data, state);
/* Copy in the phone info */
memcpy(&(state->driver), &driver_nokia_7110, sizeof(gn_driver));
/* Copy in the phone info */
memcpy(&(state->driver), &driver_nokia_7110, sizeof(gn_driver));
return GN_ERR_INTERNALERROR;
dprintf("Connecting\n");
return GN_ERR_INTERNALERROR;
dprintf("Connecting\n");
err = m2bus_initialise(state);
break;
default:
err = m2bus_initialise(state);
break;
default:
return GN_ERR_NOTSUPPORTED;
}
return GN_ERR_NOTSUPPORTED;
}
connected = true;
}
if (!connected) {
connected = true;
}
if (!connected) {