buggnokii - Bugs: bug #15706, win32 fails to init (when locking)...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15706: win32 fails to init (when locking) + FIX

Submitted by:  None
Submitted on:  Sat 11 Feb 2006 09:57:21 AM UTC  
 
Category: gnokiiSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Pawel Kot <pkot>
Open/Closed: Closed

Mon 10 Jul 2006 07:54:25 PM UTC, comment #1:

Please check the solution from the CVS sources.

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Sat 11 Feb 2006 09:57:21 AM UTC, original submission:

device: Nokia 6230 via COM9 (emulated bluetooth)

problem: the win32 port fails to init device

description:
simple command like (e.g.: --getsmsc) failes.
gnokii fails while attempting to lock the config file (not implemented for win, yet checked, so fail is guaranteed ;) )

fix:
have gnokii.c ifdef the file locking (USE_LOCKING):

...
#ifdef WIN32
#undef USE_LOCKING // locking not implemented for WIN32

...

static void businit(void)
{
gn_error error;
#ifdef USE_LOCKING
char *aux;
#endif
static bool atexit_registered = false;

gn_data_clear(&data);

#ifdef USE_LOCKING
aux = gn_cfg_get(gn_cfg_info, "global", "use_locking");
/* Defaults to 'no' */
if (aux && !strcmp(aux, "yes")) {
lockfile = gn_device_lock(state.config.port_device);
if (lockfile == NULL) {
fprintf(stderr, _("Lock file error. Exiting.\n"));
exit(1);
}
}
#endif

/* register cleanup function */
if (!atexit_registered) {
atexit_registered = true;
atexit(busterminate);
}
/* signal(SIGINT, bussignal); */

/* Initialise the code for the GSM interface. */
error = gn_gsm_initialise(&state);
if (error != GN_ERR_NONE) {
fprintf(stderr, _("Telephone interface init failed: %s\nQuitting.\n"), gn_error_print(error));
exit(2);
}
}

Anonymous

 

Attached Files
file #2000:  gnokii.c added by None (163KiB - application/octet-stream - gnokii)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 10 Jul 2006 07:54:25 PM UTCpkotStatusNone=>Fixed
  Assigned toNone=>pkot
  Open/ClosedOpen=>Closed
Sat 11 Feb 2006 09:57:21 AM UTCNoneAttached File-=>Added gnokii.c, #3386

Back to the top


Powered by Savane 3.1-cleanup1