Changeset 2885
- Timestamp:
- 11/30/07 11:22:24 (1 year ago)
- Files:
-
- plugins/opie-sync/src/opie_comms.c (modified) (3 diffs)
- plugins/opie-sync/src/opie_sync.c (modified) (1 diff)
- plugins/opie-sync/src/opie_sync.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/opie-sync/src/opie_comms.c
r2780 r2885 234 234 { 235 235 osync_trace(TRACE_ENTRY, "%s(%p)", __func__, env); 236 char* root_path; 237 238 if ( env->use_qcop ) { 239 root_path = qcop_get_root(env->qcopconn); 240 if(!root_path) { 241 fprintf(stderr, "qcop_get_root: %s\n", env->qcopconn->resultmsg); 242 osync_trace(TRACE_EXIT_ERROR, "qcop_get_root: %s", env->qcopconn->resultmsg); 243 return NULL; 244 } 245 osync_trace( TRACE_INTERNAL, "QCop root path = %s", root_path ); 246 } 247 else 248 root_path = g_strdup( "" ); 249 236 250 237 char *notes_path; 251 238 if(env->notes_type == NOTES_TYPE_OPIE_NOTES) 252 notes_path = g_build_filename( root_path, "Documents/text/plain", NULL);239 notes_path = g_build_filename(env->dev_root_path, "Documents/text/plain", NULL); 253 240 else 254 notes_path = g_strdup(root_path); 255 256 g_free(root_path); 241 notes_path = g_strdup(env->dev_root_path); 257 242 258 243 osync_trace(TRACE_EXIT, "%s(%s)", __func__, notes_path); … … 586 571 if (env->host && env->username && env->password ) 587 572 { 588 char* separator_path; 589 if ( env->use_qcop ) 590 { 591 char* root_path = qcop_get_root(env->qcopconn); 592 if(!root_path) { 593 fprintf(stderr, "qcop_get_root: %s\n", env->qcopconn->resultmsg); 594 osync_trace(TRACE_EXIT_ERROR, "qcop_get_root: %s", env->qcopconn->resultmsg); 595 return FALSE; 596 } 597 osync_trace( TRACE_INTERNAL, "QCop root path = %s", root_path ); 598 separator_path = g_strdup_printf("%s/", root_path); 599 g_free(root_path); 600 } else { 601 separator_path = g_strdup( "/" ); 602 } 573 char* separator_path = g_strdup_printf("%s/", env->dev_root_path); 603 574 604 575 /* fetch each of the requested files */ … … 988 959 if (env->host && env->username && env->password ) 989 960 { 990 if ( env->use_qcop ) 991 { 992 char* root_path = qcop_get_root(env->qcopconn); 993 if(!root_path) { 994 fprintf(stderr, "qcop_get_root: %s\n", env->qcopconn->resultmsg); 995 osync_trace(TRACE_EXIT_ERROR, "qcop_get_root: %s", env->qcopconn->resultmsg); 996 return FALSE; 997 } 998 osync_trace( TRACE_INTERNAL, "QCop root path = %s", root_path ); 999 separator_path = g_strdup_printf("%s/", root_path); 1000 g_free(root_path); 1001 } else { 1002 separator_path = g_strdup( "/" ); 1003 } 961 char* separator_path = g_strdup_printf("%s/", env->dev_root_path); 1004 962 1005 963 char *ftpurl = g_strdup_printf("ftp://%s:%s@%s:%u%s%s", plugins/opie-sync/src/opie_sync.c
r2624 r2885 191 191 goto error; 192 192 } 193 194 } 193 194 env->dev_root_path = qcop_get_root(env->qcopconn); 195 if(!env->dev_root_path) { 196 char *errmsg = g_strdup_printf("qcop_get_root failed: %s\n", env->qcopconn->resultmsg); 197 osync_error_set(error, OSYNC_ERROR_GENERIC, errmsg); 198 g_free(errmsg); 199 qcop_stop_sync(env->qcopconn); 200 goto error; 201 } 202 osync_trace( TRACE_INTERNAL, "QCop root path = %s", env->dev_root_path ); 203 } 204 else 205 env->dev_root_path = g_strdup( "" ); 195 206 196 207 osync_trace(TRACE_EXIT, "%s", __func__); plugins/opie-sync/src/opie_sync.h
r2478 r2885 79 79 qcop_conn* qcopconn; 80 80 gboolean connected; 81 gchar* dev_root_path; 81 82 82 83 xmlDoc* categories_doc;
