Changeset 2117
- Timestamp:
- 06/09/07 17:56:17 (1 year ago)
- Files:
-
- plugins/gnokii-sync/src/SConscript (modified) (1 diff)
- plugins/gnokii-sync/src/gnokii_sync.c (modified) (3 diffs)
- plugins/gnokii-sync/src/gnokii_sync.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/gnokii-sync/src/SConscript
r2114 r2117 10 10 # basic vformat plugins 11 11 gnokii_sync = env.SharedLibrary('gnokii-sync', ['gnokii_sync.c', 'gnokii_calendar.c', 'gnokii_contact.c', 'gnokii_config.c', 'gnokii_comm.c'], LIBS = ['opensync', 'gnokii'], LIBPATH = '$prefix/$libsuffix') 12 gnokii_event = env.SharedLibrary('gnokii-event', ['gnokii_calendar_format.c' ], LIBS = ['opensync'], LIBPATH = '$prefix/$libsuffix')12 gnokii_event = env.SharedLibrary('gnokii-event', ['gnokii_calendar_format.c', 'gnokii_calendar_utils.c'], LIBS = ['opensync'], LIBPATH = '$prefix/$libsuffix') 13 13 gnokii_contact = env.SharedLibrary('gnokii-contact', ['gnokii_contact_format.c', 'gnokii_contact_utils.c'], LIBS = ['opensync'], LIBPATH = '$prefix/$libsuffix') 14 14 plugins/gnokii-sync/src/gnokii_sync.c
r2103 r2117 50 50 51 51 // connect to cellphone 52 if (! gnokii_comm_connect(env->state)) {52 if (!env->connected && !gnokii_comm_connect(env->state)) { 53 53 osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "Connection failed"); 54 54 free_gnokiienv(env); 55 55 return; 56 } else { 57 env->connected = TRUE; 56 58 } 57 59 … … 102 104 103 105 // disconnect the connection with phone 104 if ( !gnokii_comm_disconnect(env->state)) {106 if (env->connected && !gnokii_comm_disconnect(env->state)) { 105 107 osync_context_report_error(ctx, OSYNC_ERROR_GENERIC, "disconnect failed"); 106 108 free_gnokiienv(env); 107 109 return; 110 } else { 111 env->connected = FALSE; 108 112 } 109 113 … … 174 178 175 179 env->sinks = NULL; 180 env->connected = FALSE; 176 181 177 182 env->state = osync_try_malloc0(sizeof(struct gn_statemachine), error); plugins/gnokii-sync/src/gnokii_sync.h
r2099 r2117 43 43 GList *sinks; // gnokii_sinkenv 44 44 struct gn_statemachine *state; 45 osync_bool connected; 45 46 46 47 } gnokii_environment;
