Here is the change if you want to apply it. File modeminit.c:
if (DEVICE.pre_init > 0)
{
writelogfile(LOG_INFO, 0, "Pre-initializing modem");
// 3.1.14:
//put_command((DEVICE.phonecalls == 2)? pre_initstring_clip : pre_initstring, answer, sizeof(answer), 2, EXPECT_OK_ERROR);
snprintf(command, sizeof(command), "%s", (DEVICE.phonecalls == 2)? pre_initstring_clip : pre_initstring);
if (get_loglevel() >= DEVICE.loglevel_lac_ci)
if (sizeof(command) > strlen(command) +8)
strcpy(command +strlen(command) -1, ";+CREG=2\r");
put_command(command, answer, sizeof(answer), 2, EXPECT_OK_ERROR);
// 3.1.15:
if (!strstr(answer,"OK") && get_loglevel() >= DEVICE.loglevel_lac_ci)
{
DEVICE.loglevel_lac_ci = get_loglevel() + 1;
snprintf(command, sizeof(command), "%s", (DEVICE.phonecalls == 2)? pre_initstring_clip : pre_initstring);
put_command(command, answer, sizeof(answer), 2, EXPECT_OK_ERROR);
}
if (!strstr(answer,"OK"))
writelogfile(LOG_ERR, 1, "Modem did not accept the pre-init string");
}
'c' Syntax Highlight powered by GeSHi